Open Hua-Zhou opened 7 years ago
Below is a (tentative) list of features I need for MendelImpute:
filter
function based on sample and record indexconvert_ht
function to import VCF files into a numeric matrix where columns are haplotypesconvert_ds
function to read dosage into a numeric matrix[x] convert_vcf
function to convert phased genotype matrix back to a VCF file. This is not implemented explicitly but is support with general write
methods. See MendelImpute's impute.jl
I will try to implement them in the next 1~2 weeks.. Are there any caveats I need to be aware of? In particular, I'm not sure what is the best way to filter based on sample index due to the data structure of VCF.Record
.
Here are a few more desired routines typically needed for quality control:
They are mentioned here
see https://github.com/vcftools/vcftools/blob/master/src/cpp/variant_file_format_convert.cpp for vcf to plink conversion.
VCF to PLINK is implemented in SnpArrays.jl.
👍
This issue documents the implementation roadmap for iterative solvers.
convert(Matrix{T}, reader::VCF.Reader)
will convert all records from the current position ofreader
to a matrix of typeMatrix{T}
copy(A::AbstractMatrix{T}, reader::VCF.Reader)
will fill the columns ofA
the GT data from the current position ofreader