Thank you for the help but there is problem whicle running this command.
java -jar bioalcidaejdk.jar -e 'final Map<String,Long> count = new HashMap<>(); stream().forEach(V->{for(int x=0;x+1< V.getNSamples();x++) {Genotype gx=V.getGenotype(x);if(!gx.isHom()) continue; for(int y=x+1;y< V.getNSamples();++y) {Genotype gy=V.getGenotype(y);if(!gy.isHom()) continue; if(!((gx.isHomVar() && gy.isHomRef()) || (gx.isHomRef() && gy.isHomVar()))) continue; final String pair=gx.getSampleName()+"\t"+gy.getSampleName();long n=count.getOrDefault(pair,0L);count.put(pair,n+1L);}}});count.forEach((K,V)->println(K+"\t"+V));' -F VCF all18_samples_merged.vcf
It generated following:
[DEBUG][BioAlcidaeJdk] Compiling : 1 import java.util.; 2 import java.util.stream.; 3 import java.util.regex.; 4 import java.util.function.; 5 import htsjdk.samtools.; 6 import htsjdk.samtools.util.; 7 import htsjdk.variant.variantcontext.; 8 import htsjdk.variant.vcf.; 9 import com.github.lindenb.jvarkit.util.bio.fasta.FastaSequence; 10 import javax.annotation.Generated; 11 import htsjdk.variant.vcf.; 12 /* begin user's packages / 13 /* end user's packages */ 14 @Generated(value="BioAlcidaeJdk",date="2018-03-27T15:38:35+0530") 15 public class BioAlcidaeJdkCustom461705101 extends com.github.lindenb.jvarkit.tools.bioalcidae.BioAlcidaeJdk.VcfHandler { 16 public BioAlcidaeJdkCustom461705101() { 17 } 18 @Override 19 public void execute() throws Exception { 20 // user's code starts here 21 final Map<string,long> count = new HashMap<>(); stream().forEach(V->{for(int x=0;x+1< V.getNSamples();x++) {Genotype gx=V.getGenotype(x);if(!gx.isHom()) continue; for(int y=x+1;y< V.getNSamples();++y) {Genotype gy=V.getGenotype(y);if(!gy.isHom()) continue; if(!((gx.isHomVar() && gy.isHomRef()) || (gx.isHomRef() && gy.isHomVar()))) continue; final String pair=gx.getSampleName()+"\t"+gy.getSampleName();long n=count.getOrDefault(pair,0L);count.put(pair,n+1L);}}});count.forEach((K,V)->println(K+"\t"+V)); 22 //user's code ends here 23 } 24 }
[WARN][SnpEffPredictionParser]no INFO[EFF] or no description. This VCF was probably NOT annotated with SnpEff (old version). But it's not a problem if this tool doesn't need to access SnpEff Annotations.
[WARN][VepPredictionParser]NO INFO[CSQ] found in header. This VCF was probably NOT annotated with VEP. But it's not a problem if this tool doesn't need to access VEP Annotations.
[WARN][AnnPredictionParser]no INFO[ANN] or no description This VCF was probably NOT annotated with SnpEff(ANN version) . But it's not a problem if this tool doesn't need to access SnpEff Annotations.
PLEASE give your suggestion what i am doing wrong.
Do i need to compress into .gz format and run exactly what you have suggested.
do you have 18 VCF or one VCF with 18 samples ? Also , do you have searched biostars.org for similar posts ?
I have 18 vcf files and i also single vcf file for 18 samples made by vcf-merge command. I am okay to choose any one if the solution is there. I have tried searching in biostars.