You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
Would it be possible?
Thank you in advance.
The text was updated successfully, but these errors were encountered: