Question: Column Regex Find And Replace
1
gravatar for alizohaib7
9 weeks ago by
alizohaib710
alizohaib710 wrote:

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 • 197 views
ADD COMMENTlink modified 9 weeks ago by shenwei3563.2k • written 9 weeks ago by alizohaib710
1

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

ADD REPLYlink written 9 weeks ago by Michael Dondrup42k
1
gravatar for Michael Dondrup
9 weeks ago by
Bergen, Norway
Michael Dondrup42k wrote:

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 COMMENTlink written 9 weeks ago by Michael Dondrup42k

Thanks Sir for your valuable comments Solved

ADD REPLYlink written 9 weeks ago by alizohaib710

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 REPLYlink written 9 weeks ago by alizohaib710

Ah, it's a Galaxy tool right?

ADD REPLYlink modified 9 weeks ago • written 9 weeks ago by Michael Dondrup42k
0
gravatar for shenwei356
9 weeks ago by
shenwei3563.2k
China
shenwei3563.2k wrote:

csvtk, supporting Windows/Linux/Mac OS X

csvtk replace -H -t -f 2 -p "gi\|(\d+).+" -r "\$1" data.tsv
ADD COMMENTlink written 9 weeks ago by shenwei3563.2k
Please log in to add an answer.

Help
Access

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