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

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

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

Thanks Sir for your valuable comments Solved

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

Ah, it's a Galaxy tool right?

ADD REPLYlink modified 4 months ago • written 4 months ago by Michael Dondrup43k
0
gravatar for shenwei356
4 months ago by
shenwei3563.4k
China
shenwei3563.4k wrote:

csvtk, supporting Windows/Linux/Mac OS X

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