Question: (Closed) HOW EDIT VCF FILE COLUMNS
0
gravatar for misbahabas
2.5 years ago by
misbahabas60
misbahabas60 wrote:

I want to change position column in vcf files. Please tell me any script or tool which solve the following issues. i am new in programming

If i have a vcf file like this

pos ref alt

1 C G

2 A T

3 C G

4 T C

5 G C

6 T A

7 T G

8 C T

9 A C

10 C A

Now i want to add some value in vcf positions values untill ending position come like add 10 into position values untill 15 then move next value 18 and add untill 25 come

10-15

18-25

40-50

I want output like this

pos ref alt

11 C G

12 A T

13 C G

14 T C

15 G C (when 15 come it stops addition and move next value)

24 T A

25 T G (second ending position come now move next)

48 C T

49 A C

50 C A

please give me any idea about it

thankx

snp tool vcf perl • 1.4k views
ADD COMMENTlink modified 2.5 years ago by RamRS26k • written 2.5 years ago by misbahabas60

Hello misbahabas!

We believe that this post does not fit the main topic of this site.

Closed until you address your previous questions. See Pierre's comment here: C: HOW EDIT VCF FILE COLUMNS

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink written 2.5 years ago by RamRS26k
1
gravatar for RamRS
2.5 years ago by
RamRS26k
Houston, TX
RamRS26k wrote:

You're not editing VCF fields here, you're restricting the regions on which variant calling is being done by providing intervals to skip. Each variant caller has provisions to call variants on only certain intervals, see GATK-HaplotypeCaller's -L flag for example.

If you already have the VCF output, you can also filter it and restrict it to certain intervals. See GATK's SelectVariants with the -L flag. You should be able to invert the selection criteria to exclude intervals - you might want to experiment a little on that.

As a sidenote, editing VCF fields is a bad idea. You do not want to mess with the data format of a file that many (tools and people) assume to follow a standard format. As another sidenote, you should phrase your question title better. Using all caps without good cause/absolute necessity is a strict no-no on professional/scientific forums.

ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by RamRS26k

I want to annotate variants in cds of gene in two species, I have a only coding sequences. i use snpeff to annotate now i want to convert cds variants position into gnomic coordinates. thats why i want to replace column of position in vcf with genomic coordinates positions. So i need above output

ADD REPLYlink written 2.5 years ago by misbahabas60
Please log in to add an answer.
The thread is closed. No new answers may be added.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1032 users visited in the last hour