Entering edit mode
8.4 years ago
rastogi.suraj93
▴
30
Hello everyone,
I would like to appreciate if some one help me. I tried to make SNPs ID in VCF file REplace to 0 but facing some problem which occur by commands. my commands is
/SnpEff cat variants.vcf | java -jar SnpSift.jar filter --set my_rs.txt "ID in SET[0]" > filtered.vcf
and after getting error like -
Exception in thread "main" java.lang.RuntimeException: File not found 'my_rs.txt'
so please some one help me where I have to make the mistake for accessing this command ?
Thanking you all
yeah..so please suggest me any other tools and command
From the SnpSift manual:
I don't use SnpSift, but it seems not too complicated: Generate a file called my_rs.txt with one SNP id per line. Do you have that file?
No I dont have. I have vcf file without SNP ID like -
CHROM POS ID REF ALT QUAL
NC_00839 536376 0 TAGCTAGCT TAGCTAGCTAAGCTAGCT 96.5
Well, you wrote
Do you have SNP IDs for your SNPs? Do you have a file with 'chromosome position SNP-id'? If you don't have something like this: With what do you want to replace the SNP id??
yeah, in my snp file have chr position but SNP ID is not mention. at the column of ID is mention only 0. I want also give SNP ID in my file like
rs58108140
rs71262674
rs71262673 so how can I give to SNP ID in my vcf file?
Afaik there is 'no automatic SNP id naming tool'.
You could make a SNP-id e.g., consisting of chromosome name and position:
awk '{if ( $1 ~ /^#/ ) {print $0} else {$3 = $1"_"$2; print $0}}' YOUR.vcf > NEW.vcf
Ok, thank you so much. I will try like this.