Releases: OchoaLab/genio
Releases · OchoaLab/genio
6th CRAN release: minor updates and check fixes
genio 1.1.1.9000 (2022-09-15)
- Function
write_plinkadded optionwrite_phento streamline writing simulation outputs more (as phen files are often required).
genio 1.1.2 (2023-01-04)
- 6th CRAN submission
- Fixed an R-devel warning about
sprintfusage (see below).- Solution was to replace calls to
sprintf, all of which then went tostop, with direct calls tostop.* checking compiled code ... WARNING File ‘genio/libs/genio.so’: Found ‘sprintf’, possibly from ‘sprintf’ (C) Objects: ‘read_bed_cpp.o’, ‘write_bed_cpp.o’ Compiled code should not call entry points which might terminate R nor write to stdout/stderr instead of to the console, nor use Fortran I/O nor system RNGs nor [v]sprintf.
- Solution was to replace calls to
- Ran spellcheck, made one correction.
- Updated
cran-comments.md
CRAN release: expanded binary GRM read/write, switched bim$ref and bim$alt, many other bugfixes
genio 1.0.26.9000 (2021-08-12)
- Function
read_eigenvecfixed this warning:- "The
valueargument ofnames<-must be a character vector as of tibble 3.0.0."
- "The
genio 1.0.27.9000 (2021-08-16)
- Functions
write_bed,write_plink, andcount_linesfixed a bug: write (or read) failed if output path started with "~/" on Unix systems.
Problem was the path wasn't expanded in C++ code.- For example,
write_plink( '~/test', X )failed with message:Writing: ~/test.bed Error in write_bed_cpp(file, X, append = append) : Could not open BED file `~/test.bed` for writing: No such file or directory Calls: write_plink -> write_bed -> write_bed_cpp Execution halted - Thanks to Bingsong Zhang for reporting the bug!
- For example,
genio 1.0.28.9000 (2021-08-17)
- Functions
read_eigenvecandwrite_eigenvechave new optionplink2for better handling files with headers in the default style of plink2.
genio 1.0.29.9000 (2022-01-14)
- Bug fix in
count_linesand allread_*functions, which useadd_ext_readinternally to sort out file paths:- Now setting
ext = NAfinds files that end in a.gzextension that was not specified (before those files were incorrectly not found). - Example:
read_matrix( 'my-file', ext = NA )now finds and readsmy-file.gzif it exists andmy-filedoes not exist.
- Now setting
READMEfixed github installation instructions to build vignette, explained how to view it.
genio 1.0.30.9000 (2022-01-27)
- Function
read_grmadded several options to facilitate reading GRM-like formats produced byplink2, particularly data produced by--make-kingwithbinorbin4options. Added options:extto specify alternate shared extensions (like "grm" or "king").shapeto specify whether the input is a full "square" matrix, a "triangle" with diagonal (default for GRM) or a "strict" triangle without diagonal (for KING-robust).size_bytesto parsebin4/GRM (4) orbin(8) plink2 data.commentto control comment characters in the<ext>.idfile.
- Internal functions
vec_to_mat_symandmat_sym_to_vecadded optionstrictto exclude diagonal in their transformations. - Internal function
read_tab_genericadded optioncommentto set comment characters.
genio 1.0.31.9000 (2022-01-28)
- Function
write_grmadded the same options added yesterday toread_grm(see there) to write GRM-like formats produced byplink2, particularly data produced by--make-kingwithbinorbin4options. - Function
read_grmedited documentation only, particularly added parsing examples for variousplink2 --make-kingoutputs.
genio 1.0.32.9000 (2022-02-02)
- Function
write_bednow checks if output directory exists prior to attempting to open the file for writing in the C++ part of the code.- The original code crashed "ruthlessly" in RStudio if the path contains a directory that does not exist, triggering an error such as this one on a terminal:
*** buffer overflow detected ***: terminated Aborted (core dumped) - The new code produces an ordinary (fatal) error message in R without the buffer overflow.
- Bug reported by Richel Bilderbeek (thanks!)
- The original code crashed "ruthlessly" in RStudio if the path contains a directory that does not exist, triggering an error such as this one on a terminal:
genio 1.1.0.9000 (2022-04-20)
- Functions
read_bim,write_bim, andgeno_to_char: reversed columns "ref" and "alt" in BIM table- Previous versions treated the first allele column from the (headerless) BIM file as "ref", second as "alt", in part because the plink 1.9 documentation was unclear about their identities (they were simply called alleles "1/clear bits/usually minor" and "2/set bits/usually major").
- New version has first allele column as "alt", second as "ref", after seeing plink 2.0 documentation define them explicitly this way, and after noticing reverse correspondence with ref/alt values in VCF files (thanks Ochoa Lab members Amika Sood and Tiffany Tu for reporting these issues!).
read_bimnow returns a tibble with allele names "alt" and "ref" in that order (columns still ordered as they appear in input file)write_bimwrites tables with column "alt" before "ref"geno_to_charreverses the role of "alt" and "ref" correspondingly so that the output remains the same as before these changes (the original outputs were correct as validated against the plink1 "ped" text genotypes).- All documentation was updated to reflect these changes.
genio 1.1.1 (2022-04-27)
- 5th CRAN submission
- Ran spellcheck (no changes)
- Updated
cran-comments.md
CRAN release: bug fixes
genio 1.0.23.9000 (2021-07-01)
- Function
read_bednow readsfileeven if it doesn't have a BED extension (as long as it exists).- For additional flexibility, this function also has a new
extoption. - Thanks to Richel Bilderbeek for reporting this problem.
- For additional flexibility, this function also has a new
- Updated documentation for some
read_*functions to clarify behavior regardingfileandextoptions. - Internal changes
- Renamed internal function
real_pathtoadd_ext_readto make the distinction clearer toadd_ext. - Verified that all
read_*functions useadd_ext_readwhile allwrite_*functions useadd_ext.
Only functioncount_linesswitched fromadd_exttoadd_ext_read(in addition toread_bed, which led to the earlier change), butcount_linesdidn't have a default extension so this change is less likely to matter.
- Renamed internal function
- Reformatted this
NEWS.mdslightly to improve its automatic parsing.
genio 1.0.24.9000 (2021-07-01)
- Functions
read_bedandread_plinkno longer stop with an error if the input BED file has non-zero padding bits.- A real-life example (link below, also part of tests now) reported by Richel Bilderbeek (Thanks!) caused the error.
- https://github.com/kausmees/GenoCAE/tree/master/example_tiny
- I verified that both the
plink2binary and theBEDMatrixR package load this file without complaining about the non-zero pads, so I decided to agree in that behavior. I verified thatgenio's data agrees withBEDMatrixafter the fix.
genio 1.0.25 (2021-07-26)
- 4rd CRAN submission
write_bed/plinkwithappend = TRUEdebugged to write in "binary" mode.- Fixed rare error observed in Windows only, where "binary" mode makes a difference, and only when written bytes matched certain special characters (such as newlines).
- Bug probably present since
appendoption was introduced in 1.0.15.9000 (2020-07-03).
- Internally replaced
readr::read_table2withreadr::read_table- Fixes warning message:
read_table2()was deprecated in readr 2.0.0. Please useread_table()instead.- Reported by Richel Bilderbeek (thanks again!)
- Requires
readr(>= 2.0.0, already on CRAN). - Added tests for verbosity
- Fixes warning message:
- Replaced
pryr::object_sizewithlobstr::obj_size(a suggested package used in vignette only; the former was recently superseded by the latter)- One-line vignette update for a change in former
pryr::object_sizeoutput (now of classlobstr_bytes), which triggered a CRAN warning.
- One-line vignette update for a change in former
3rd CRAN release: added support for GCTA GRM, eigenvec, matrix, plink append, count lines, etc
2020-05-21 - genio 1.0.13
- Added
tidy_kinshipto transform a square symmetric matrix into a long-format table that is easy to sort and add annotations to
2020-06-16 - genio 1.0.13.9000
- Added
read_grmandwrite_grmto read and write GCTA's binary genetic relatedness matrix (GRM) format. - Also added auxiliary functions
require_files_grm,delete_files_grm,require_files_phen, anddelete_files_phen.
2020-06-23 - genio 1.0.14.9000
- Improved error message in
validate_tab_generic.
2020-07-03 - genio 1.0.15.9000
- Functions
write_plink,write_bed, andwrite_bimnow haveappendoption, for writing extremely large files in parts.
2020-07-28 - genio 1.0.16.9000
- Added
write_eigenvecandread_eigenvecto read and write Plink/GCTA eigenvector files.
2020-07-31 - genio 1.0.17.9000
- Added
count_lines, uses C++ code (via Rcpp) to count file lines extremely quickly.
Intended for counting numbers of individuals (from FAM and equivalent files) or numbers of loci (from BIM and equivalent files) when these files are extremely large and no other information is needed from those files.
2020-08-17 - genio 1.0.18.9000
- Function
read_eigenvecadded Plink 2 support viacommentoption, which by default now treats data after#as comments.
This enables automatically parsing eigenvec files generated by Plink 2, whose header line starts with#(this header is ignored).
Previously, parsing Plink 2 eigenvec files generated warnings and resulted in the first row being an additional row with allNAvalues.
2020-12-22 - genio 1.0.19.9000
- Function
read_bedadded a missing file check in R code.- A check in the underlying C++ code already existed, but it could suffer from a buffer overflow if the erroneous file path was very long.
Such buffer overflows are now completely avoided.
- A check in the underlying C++ code already existed, but it could suffer from a buffer overflow if the erroneous file path was very long.
- Vignette: Removed
lfacomparison.- My latest
lfafork doesn't have functionread.bedanymore, previously the slowest and most memory-hungry competitor, whichgenio::read_plinkwas being compared to.
- My latest
2021-02-16 - genio 1.0.20.9000
- Documentation updates:
- Added GRM examples to README and
geniopackage doc - Clarified language and code examples throughout, normalized style (full conversion to roxygen markdown, including fixing some cases where old non-markdown notation did not work anymore)
- Spellchecked package
- Added GRM examples to README and
2021-04-27 - genio 1.0.21.9000
- Added function
geno_to_charto convert genotype numeric codes (allele dosages such as 0, 1, 2) into character codes such as 'A/A', 'A/G', 'G/G' (depending on locus). - Added functions
read_matrixandwrite_matrix, intended for admixture inference data. - Fixed documentation for
read_bed, which previously incorrectly stated that the numerical genotypes (allele dosages) counted alternative alleles (allele 2 in BIM table), whereas the truth is that they count reference alleles (allele 1).
2021-05-21 - genio 1.0.22.9000
- Function
count_linesnow returns value as integer instead of double (a very minor bug/annoyance fix).
2021-06-11 - genio 1.0.23
- 3rd CRAN submission
- Removed
lfafrom suggested packages (no connection anymore sincelfacomparison was removed from vignette in version 1.0.19.9000). - Fixed a dead link in the vignette.
- Removed "LazyData: true" from DESCRIPTION (to avoid a new "note" on R-devel).
2nd CRAN release: read/write phen, fixed ~/ bug
2019-07-22 - genio 1.0.11
- Added
read_phenandwrite_phen, a phenotype format (very similar to plink's FAM) used by GCTA and EMMAX. - Now
write_plinkreturns the data it wrote, invisibly as a list.
Most useful for auto-generated data.
2019-08-05 - genio 1.0.11.9000
- Fixed a "buffer overflow" bug that occurred when input files started with "~/" on Unix systems.
2019-12-17 - genio 1.0.12
- Second CRAN submission
- Moved logo to
man/figures/ - Minor Roxygen-related updates.
2nd CRAN release
2019-05-28 - genio 1.0.10
- CRAN submission follow ups, fixing issues that arose on other systems:
- Added
include <cerrno>to my cpp code. - Fixed a "heap buffer overflow" detected by valgrind that only occurred for data with fewer than 9 individuals (included many of my toy tests).
- Edited a test within vignette to allow for small machine precision-level errors.
- Added
First CRAN release
2019-03-15 - genio 1.0.0.9000
- First GitHub release! Includes
read_bim,read_fam,read_ind, andread_snpfunctions.
2019-03-31 - genio 1.0.1.9000
- Added an efficient
write_bedwritten in Rcpp and thoroughly tested againstBEDMatrixpackage.
2019-04-01 - genio 1.0.2.9000
- Improved
write_bederror message for invalid data, documentation. - Extended
write_bedtests.
2019-04-01 - genio 1.0.3.9000
- Added
write_fam,write_bim,write_ind,write_snpfunctions. - Refactored
read_*code, updated docs and tests.
2019-04-02 - genio 1.0.4.9000
- Added
make_fam,make_bim, andwrite_plinkfunctions. - Fixed
read_fambug (used to require phenotypes to be integers, now can be double numbers). - Added
verboseoption towrite_bed.
2019-04-05 - genio 1.0.5.9000
write_plinknow returnsNULLinvisibly.- Added
require_files_plink,delete_files_plink. - Removed "Fatal: " prefix from stop messages.
2019-04-08 - genio 1.0.6.9000
- Added
ind_to_fam,sex_to_int,sex_to_char. - 2019-05-13: added ORCID to author info
2019-05-16 - genio 1.0.7.9000
- Added
read_bedandread_plink!
Now all plink reading and writing operations are supported. - Added package documentation summarizing main read and write functions.
- Added vignette comparing our BED reader and writer to those of
BEDMatrix,snpStats, andlfa.
2019-05-21 - genio 1.0.8
- First CRAN submission
- Genotype matrix row and column names from BIM/FAM files
read_plinknow includes row and column names automatically.read_bedaccepts either row and column names or just their numbers.write_plinkchecks these row and column names against the BIM and FAM tables for consistency, if these are all present.
- Added memory estimation and comparisons sections to vignette.
- Windows debugging
- Now BED writing is in binary mode, like reading already was.
- Reduced comparisons to
BEDMatrixin testing, since it leaves temporary files open and on Windows they do not get deleted and leave confusing error messages behind.
2019-05-24 - genio 1.0.9
- CRAN-requested edits, resubmission
- DESCRIPTION edits
- Changed examples, vignettes, and tests to write files to the default temporary directory.