Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding INFO data in bioalcidaejdk.jar result #196

Open
se2cheeese opened this issue Dec 22, 2021 · 1 comment
Open

Adding INFO data in bioalcidaejdk.jar result #196

se2cheeese opened this issue Dec 22, 2021 · 1 comment

Comments

@se2cheeese
Copy link

se2cheeese commented Dec 22, 2021

Hello.
I found your bioalcidaejdk.jar very useful to make a table that summarizes the numbers of homozygous and heterozygous non-reference from a multi-sample VCF file.

I used the following code to follow your instruction.
java -jar /gpfs/group/torkamani/salee/Tools/jvarkit/dist/bioalcidaejdk.jar -e 'final List<GenotypeType> all_types = Arrays.asList(GenotypeType.values());println("CHROM\tPOS\tREF\tALT\t"+all_types.stream().map(T->"count."+T.name()+"\tsample."+T.name()).collect(Collectors.joining("\t")));stream().forEach(V->println( V.getContig()+"\t"+ V.getStart()+"\t"+ V.getReference().getDisplayString()+"\t"+ V.getAlternateAlleles().stream().map(A->A.getDisplayString()).collect(Collectors.joining(","))+"\t"+ all_types.stream().map(T-> String.valueOf( V.getGenotypes().stream(). filter(G->G.getType().equals(T)). count()) + "\t"+ V.getGenotypes().stream(). filter(G->G.getType().equals(T)). map(G->G.getSampleName()). collect(Collectors.joining(",")) ). collect(Collectors.joining("\t"))) );' $INPUT > $OUTPUT

I wonder whether it is possible to add INFO's in vcf to the final result?
For example, I would like to add Gene.refGene to the final result below.

CHROM POS REF ALT Gene.refGene count.NO_CALL sample.NO_CALL count.HOM_REF ...

Would it be possible?

Thank you in advance.

@lindenb
Copy link
Owner

lindenb commented Dec 22, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants