igvteam / igv-reports

Python application to generate self-contained pages embedding IGV visualizations, with no dependency on original input files.
MIT License
350 stars 52 forks source link

Allow selecting fields from the sample columns. #16

Closed johanneskoester closed 2 years ago

johanneskoester commented 5 years ago

As the title says, it would be great if per-sample annotation could be selected similar to info fields.

jrobinso commented 3 years ago

Apologies for the long delay in responding. Its not clear to me how this would work, the row represents the variant site not a specific sample. Perhaps the table would be extended out with additional columns per sample.

yeemey commented 3 years ago

Is this now addressed by the --sample-columns LIST argument? If so, how do I specify the LIST? I'm using igv-reports-1.0.4, and I've tried the following, but didn't get the columns:

--sample-columns GT AD DP

--sample-columns sample_name/GT sample_name/AD sample_name/DP

--sample-columns sample_name

jrobinso commented 2 years ago

Sorry this issue got dropped. @yeemey If this is still relevant a year later, what exactly are you trying to do?

jrobinso commented 2 years ago

I'm going to make a guess here that what's being requested is support for genotype fields defined in ##FORMAT lines. There is some mention of a ##SAMPLE field in the specification but its not clear to me what that does and I've never seen an example.

jrobinso commented 2 years ago

OK I think this is finally implemented. The --sample-columns option was broken, sorry about that. Its fixed now, the values should be the ##FORMAT IDs, e.g.

--sample-columns GT AD DP

This would be a potential problem as is, some VCFs have thousands of samples, so a new parameter has been introduced, --samples, to explicitly list samples to include in the table. If this is missing all samples are included.

The second example in the README uses both parameters, example output is here.