Column Regex Find And Replace
2
1
Entering edit mode
6.9 years ago
alizohaib7 ▴ 10

Hi

I have a very basic query. I am having my blast results in tabular format. Column 2 in my results look like

gi|6561412|gb|AF191073.1|AF191073_Stealth_virus_1_clone_3B43,_genomic_sequence

I want to get output like as mentioned below

6561412

I want to do this using Column Regex Find And Replace

Regards Ali Zohaib

regex text manipulation • 2.3k views
ADD COMMENT
1
Entering edit mode

Interesting example, regarding "stealth viruses" see Blacklist of questionable genbank entries

ADD REPLY
1
Entering edit mode
6.9 years ago
Michael 54k

So you want to extract the gi number? I think those have deprecated. Anyway the regex in perl would be something like /gi|(\d+)|/ I don't know what Column Regex Find And Replace means, it is not a software, I guess.

ADD COMMENT
0
Entering edit mode

Thanks Sir for your valuable comments Solved

ADD REPLY
0
Entering edit mode

Column Regex Find And Replace is a tool available on our serve in which we just selected the column to work on in our dataset.

ADD REPLY
0
Entering edit mode

Ah, it's a Galaxy tool right?

ADD REPLY
0
Entering edit mode
6.9 years ago

csvtk, supporting Windows/Linux/Mac OS X

csvtk replace -H -t -f 2 -p "gi\|(\d+).+" -r "\$1" data.tsv
ADD COMMENT

Login before adding your answer.

Traffic: 3873 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