brentp / slivar

genetic variant expressions, annotation, and filtering for great good.
MIT License
248 stars 23 forks source link

Family Expression Errors #67

Closed Roj4ck closed 3 years ago

Roj4ck commented 4 years ago

I'm trying to run Slivar on a family that has two unaffected parents but two affected children. Each time I utilize the family expressions I keep getting an error expected at least 5 tab-delimited columns in ped file. The family only has four members so i'm not quite sure why it's expecting 5 tab-delimited columns but I have my ped set as the attached. I'm also a little confused on the proper family expression statement I should be using to identify the family (which may be trivial and I'm just misunderstanding how to properly write it.) Thank you for your time!
ped.txt

brentp commented 4 years ago

Hi, you have created an alias file, as would be used with --alias and then with --group-expr. To use a --family-expr, you need to specify a pedigree file like:

#family_id sample_id paternal_id maternal_id sex phenotype
fam 2009617   2114337   2114302  1  2
fam 2115432   2114337   2114302  1  2   
fam 2114337  -9  -9 1 1
fam 2114302  -9  -9 1 2

you'll need to make sure that is tab separated.

if you do want to use a --alias file as your ped.txt file currently is, then you can just specify a --group-expr, like:

--alias ped.txt \
--group-expr "recessive:mom.het && dad.het && kid.hom_alt && sibling.hom_alt"
Roj4ck commented 3 years ago

Thank you for the quick response! I attempted to make the adjustments you suggested utilizing the PED you provided.
I started running hte following command: ./slivar expr --js slivar-functions.js -g gnomad.hg37.zip \ --vcf $vcf --ped $ped \ --info "INFO.gnomad_popmax_af < 0.02 && variant.FILTER == 'PASS'" \ --family-expr "aff_only:fam.every(function(s) { s.het == s.affected && s.hom_ref == !s.affected && s.GQ > 5 })" --pass-only And when running i'm getting the following errors:

slivar version: 0.1.12 97859c00a4387c869719330521c36d0b12e92247 [pedfile] error: expected at least 6 tab-delimited columns in ped file: /home/cohort.ped [pedfile] error: line was:@["fam 2009617 2114337 2114302 1 2"] SIGSEGV: Illegal storage access. (Attempt to read from nil?)

There are definitely 6 tab-delimited columns in the ped file I tried copying and pasting directly and manually recreating it manually and i still seem get that error and the sigsegv illegal storage access errors which is similar to one of the earlier issues but i'm using the latest version.

Thank you again for your time.

brentp commented 3 years ago

That means that your ped file is actually space delimited, not tab delimited.

Roj4ck commented 3 years ago

I was tabbing between values but it wasn't properly formatting. Once I adjusted that it did run successfully (tabs vs spaces the eternal battle). Thank you for your assistance Brent!