Question: Column Regex Find And Replace
1
gravatar for alizohaib7
13 months 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 • 387 views
ADD COMMENTlink modified 13 months ago by shenwei3564.0k • written 13 months ago by alizohaib710
1

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

ADD REPLYlink written 13 months ago by Michael Dondrup44k
1
gravatar for Michael Dondrup
13 months ago by
Bergen, Norway
Michael Dondrup44k 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 13 months ago by Michael Dondrup44k

Thanks Sir for your valuable comments Solved

ADD REPLYlink written 13 months 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 13 months ago by alizohaib710

Ah, it's a Galaxy tool right?

ADD REPLYlink modified 13 months ago • written 13 months ago by Michael Dondrup44k
0
gravatar for shenwei356
13 months ago by
shenwei3564.0k
China
shenwei3564.0k wrote:

csvtk, supporting Windows/Linux/Mac OS X

csvtk replace -H -t -f 2 -p "gi\|(\d+).+" -r "\$1" data.tsv
ADD COMMENTlink written 13 months ago by shenwei3564.0k
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: 1008 users visited in the last hour