In R: Is There A Prior Code/Library Which Can Classify Variations As Indels?
1
2
Entering edit mode
12.3 years ago
user56 ▴ 300

I have a VCF file for one gene which has about 1000 variants. Some of those are SNPs, but others are indels.

e.g., when REF is C and ALT is CT then it is an insertion.

I could write my code for that but I would prefer some library in R (or other language) which could do that. Is there such library?

r vcf • 1.8k views
ADD COMMENT
2
Entering edit mode
12.3 years ago
JC 13k

perl one liner:

perl -lane 'print if (m/^#/ or ($F[3] =~ m/[ACGT]{1,1}/ and $F[4] =~ m/[ACGT]{1,1}/))' < file.vcf > output.vcf

ADD COMMENT

Login before adding your answer.

Traffic: 2531 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6