bioinformatics-ptp / detectRUNS

detectRuns: a R Package for Runs of Homozygosity and Runs of Heterozygosity
8 stars 4 forks source link

Deal with tab-separated ped files #10

Open bunop opened 5 years ago

bunop commented 5 years ago

Is your feature request related to a problem? Please describe. As described in #9, slidingRUNS.run cannot handle tab separated files. Change code and try to deal with tab separate files or add a warning to the user

Describe the solution you'd like Deal with both Tab Separated Files and Space Separated Files (and even the binary format if possible)

Describe alternatives you've considered We could simply state that the Space Separated format is the only supported format in our vignettes and documentation

Additional context

or

filippob commented 4 years ago

In the meanwhile, tab-separated Plink files can be converted to space-separated files within Plink using the --recode option, which under Plink 1.9 should produce space-separated files, or forcing this explicitly with the spacex option (details here: Plink data management)

Alternatively, tab-delimited files can be converted to space-delimited files in R (e.g. data.table::fread/fwrite), or using bash commands (e.g. sed)