brentp / somalier

fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs... "like damn that is one smart wine guy"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sex check

equinne5 opened this issue · comments

Hi - is it possible to use somalier to infer sex? I thought this was happening via --infer but it seems to just be duplicating what is in the ped file ( & if ped file not supplied the .samples.tsv just lists sex as -9) . Do I need to use another tool for this or am I missing something?

many thanks!

Do you have sufficient coverage on the X chromosome? It should be inferring sex.

ah OK possibly something like that - I'm using a vcf as input and the x depth mean is 16.5 & X_n 121

that should be sufficient. Can you show the full command and the stdout and stderr?

somalier relate cohort/*.somalier --infer
somalier version: 0.2.16
[somalier] starting read of 1 samples
[somalier] time to read files and get per-sample stats for 1 samples: 0.00
[somalier] time to get expected relatedness from pedigree graph: 0.00
[somalier] time to calculate all vs all relatedness for all 0 combinations: 0.00
[somalier] wrote interactive HTML output for 0 pairs to: somalier.html
[somalier] wrote groups to: somalier.groups.tsv (look at this for cancer samples)
[somalier] wrote samples to: somalier.samples.tsv
[somalier] wrote pair-wise relatedness metrics to: somalier.pairs.tsv

& then somalier.samples looks like :

#family_id sample_id paternal_id maternal_id sex phenotype original_pedigree_sex gt_depth_mean gt_depth_sd depth_mean depth_sd ab_mean ab_std n_hom_ref n_het n_hom_alt n_unknown p_middling_ab X_depth_mean X_n X_hom_ref X_het X_hom_alt Y_depth_mean Y_n
sampleid sampleid -9 -9 -9 -9 -9 34.4 7.4 21.2 17.7 0.46 0.3 2148 6776 1228 7232 0.018 16.5 121 60 0 61 11 3

is it possible you could share your somalier file? If so, send to bpederse@gmail.com

I pushed a fix for this. Thanks very much for the test-case.
--infer is not as well-used as the rest of somalier
https://github.com/brentp/somalier/releases/tag/v0.2.19