Thanks a lot. But I need small information. I don't have a vcf file. I'm using a mutation file from TCGA. Will it be same for this one too?
Hello Everyone,
Can anyone please tell me a way to count the Indels > 3 bp, Indels b/w 1 & 3 bp and also how to count the point mutations?
Thank you
1 answer
Indels > 3 bp
using vcffilterjs https://github.com/lindenb/jvarkit/wiki/VCFFilterJS
$ curl -s "http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz" | gunzip -c | java -jar dist/vcffilterjs.jar -e 'function accept(v) {var alts=v.getAlternateAlleles(),refLen=v.getReference().length();for(var i=0;i<alts.size();++i) {var="" alt="alts.get(i);" if(alt.isSymbolic())="" continue;="" var="" altLen="alt.length();" if(="" Math.abs(refLen-altLen)="">=3) return true; } return false;}accept(variant);' | wc -l
15574
Indels b/w 1 & 3
curl -s "http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz" | gunzip -c | java -jar dist/vcffilterjs.jar -e 'function accept(v) {var alts=v.getAlternateAlleles(),refLen=v.getReference().length();for(var i=0;i<alts.size();++i) {var="" alt="alts.get(i);" if(alt.isSymbolic())="" continue;="" var="" altLen="alt.length();" var="" diff="Math.abs(refLen-altLen);if(diff">1 && diff <3) return true; } return false;}accept(variant);' | wc -l
7388
point mutations?
$ curl -s "http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz" | gunzip -c | java -jar dist/vcffilterjs.jar -e 'variant.isSNP()' | wc -l
Hello Pierre,
Could you please tell me whether I can use this for "https://tcga.xenahubs.net/download/TCGA.LIHC.sampleMap/mutation_bcm" or not? Should I only use vcf ?
there is also an error
[main] ERROR jvarkit - <eval>:1:121 Expected ident but found = function accept(v) {var alts=v.getAlternateAlleles(),refLen=v.getReference().length();for(var i=0;i<alts.size();++i) {var="" alt="alts.get(i);" if(alt.issymbolic())="" continue;="" var="" altlen="alt.length();" if(="" math.abs(reflen-altlen)="">=3) return true; } return false;}accept(variant); ^ in <eval> at line number 1 at column number 121 [main] ERROR jvarkit - Command initialization failed 0
Log in to answer this question.
are you able to develop a script in R?
I guess its easier to go with linux commands right