This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Rows Comparison In Excel Using Perl,, Sequence

HI guyz, i have Excel file which is as follows:

Start     End     Aligmt_len    Sequence     %Identity
10385    10615    60    ATATATATGGACCAGGATCAGAT    100
11470    12102    60    GGACCATTAGGACCAGATTAGAC    99
10385    10615    30    TTAGGACCAGGATCAGATTAAAG    98
12102   11470    24    ATATATATGGACCAGGATCAGAT    88
97    150    98    ATATATATGGACCAGGATCAGAT    100

If the End>start and Alignmt_len>35 and %Identity>=85 then

my output should look or print like as follows:

10385    10615    60    ATATATATGGACCAGGATCAGAT    100
11470    12102    60    GGACCATTAGGACCAGATTAGAC    99
97    150    98    ATATATATGGACCAGGATCAGAT    100

I have no Idea how to do this USING PERL WITHOUT using any SPREADSHEET module

anybody who knows kindly help me with codes .plzzzzzzz

Thank you

perl bioperl sequence

2 answers

In Excel you can use can play with "IF" condition on columns... or export your file to tab limited text (inputfile) and try this

awk ' BEGIN {OFS = FS = "\t"};{ if ( $2 > $1 && $3>=35 && $NF>=85 ) print $0}' infutfile

THANK YOU RM FOR REPLY.....

Is this homework? Can't you convert the file to plain text?

But unless the file is too monstrous to open in Excel, why not just do it in Excel using filters? You'll have to add another column for end - start.

If i wanted to do it using filter i Wudn't have POSTED it here,,using perl,,,!!

anywayz thank you very much for the reply,,,

i did it by myself,,,, jus 8 line code,,

We never know WHAT WE CAN DO UNTIL WE TRY IT..

Log in to answer this question.