Question: looking for a tool
1
gravatar for olivier.claude
3.0 years ago by
France
olivier.claude • 30 wrote:

hello,

i am tring to play with some datas, but i am facing some problems:

- i want to know the lenght of the sequence (column5) and i didn't found any tool allowing to do it.

-I want to substract column 4 to column 3 . No tools neither.

Any idea?

here is a sample to help:

1 2 3 4 5
posterior 0.865 168 181 NRKRRQRREWEARR
posterior 0.865 120 135 NRKRRQRREWEARR
posterior

0.968

278

290

VEKRPRRKRRTRL

 Thanks a lot & have a nice day!

 

Olivier

 

         
           
           
           

 

count substract galaxy • 1.0k views
ADD COMMENT • link • modified 3.0 years ago by Bjoern Gruening ♦ 5.1k • written 3.0 years ago by olivier.claude • 30
5
gravatar for Devon Ryan
3.0 years ago by
Devon Ryan • 1.9k
Germany
Devon Ryan • 1.9k wrote:

This can be done with "awk" under the "Unix tools". To get the length of column 5 the program is:

{print length($5)}

To get the difference between columns 4 and 3 it'd be

{print $4-$3}
ADD COMMENT • link modified 3.0 years ago • written 3.0 years ago by Devon Ryan • 1.9k
5
gravatar for Hotz, Hans-Rudolf
3.0 years ago by
Switzerland
Hotz, Hans-Rudolf • 1.8k wrote:

Hi Oliver

I suggest the following for your first question:

 1) Text Manipulation -> Add column: Add "1" with Iterate set to 'yes', this will give you unique identifiers for every line in your table

2) FASTA manipulation -> Tabular-to-FASTA: select column 6 as title and column 5 as sequence

3) FASTA manipulation -> compute sequence length:

 

... for your second question:

1) Text Manipulation -> compute: use expression "c4-c3"

 

Hope this helps, Hans-Rudolf

ADD COMMENT • link written 3.0 years ago by Hotz, Hans-Rudolf • 1.8k
3
gravatar for Bjoern Gruening
3.0 years ago by
Bjoern Gruening ♦ 5.1k
Germany
Bjoern Gruening ♦ 5.1k wrote:

Hi Olivier,

sorry to be so late to this game. Just to add a very simple solution: Use the tools "Compute an expression on every row" and insert into the "Add expression" field "len(c5)". You will get a file with a new column that has the length of your sequence.

Such nice tricky and more you can find here:

https://github.com/bgruening/galaxy-tricks

Cheers,

Bjoern

ADD COMMENT • link written 3.0 years ago by Bjoern Gruening ♦ 5.1k

Thanks for adding the list of all build-in functions to the help text of "column_maker.xml" (i.e. 'Compute an expression on every row')

 
ADD REPLY • link written 3.0 years ago by Hotz, Hans-Rudolf • 1.8k
0
gravatar for olivier.claude
3.0 years ago by
France
olivier.claude • 30 wrote:

it works fine thanks to both of you !

Olivier.

ADD COMMENT • link written 3.0 years ago by olivier.claude • 30
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 16.09
Traffic: 171 users visited in the last hour