Rows Comparison In Excel Using Perl,, Sequence
2
0
Entering edit mode
13.1 years ago
Kiran ▴ 80

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 • 3.3k views
ADD COMMENT
1
Entering edit mode
13.1 years ago
Rm 8.3k

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
ADD COMMENT
0
Entering edit mode

THANK YOU RM FOR REPLY.....

ADD REPLY
0
Entering edit mode
13.1 years ago
Swbarnes2 ★ 1.6k

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.

ADD COMMENT
0
Entering edit mode

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..

ADD REPLY

Login before adding your answer.

Traffic: 1271 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6