Skip to content

Fallback parsing for Genotype files (esp. 23andMe) #428

@BenjaminHCCarr

Description

@BenjaminHCCarr

It would be useful (thought possible CPU expensive) to have a fallthrough tree for file types if the indicated one does not work.

My biggest request is that 23andme-format would fallback to 23andMe-EXOME, VCF-format (or reverse) in the case of:
We are sorry to inform you that there was at least one line in your genotyping file, excluding the header, that could not be parsed correctly.
Prior to emailing the user.
This greatly increases the user experience (UX) likely at a low cost of parsing the file; it appears based on the speed that this is a regexp check, so you could even do a stupid simple regexp (not sure which expression engine you are using).

if 23andme-format fails, see if outside the header (heck, do a head -n 10)
^1\ matches, then try parsing with 23andMe-EXOME, VCF-format

with the reverse being true if EXOME fails see if
^rs[digits]\ on a head after the header.

It also saves bandwidth on both ends, so in the end, depending on hosting, may end up saving you money in transport costs versus cpu cycles.

deCODEme
has a unique header:

Name,Variation,Chromosome,Position,Strand,YourCode
rs[digits]\ 

as does FamilyTreeDNA

RSID,CHROMOSOME,POSITION,RESULT
\"rs[digits]\"\,

Though I would think the 23andMe is the most likely fault case.
If you can point me to the right place in the src tree I would be happy to write a PR for this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions