The gene number can basically vary.
you can have <2 genes
Hi there,
Your code worked like a charm although it has a bug or a error on my side providing incomplete details.
My sample input was
Gene1,Gene2,spc1,spc2
Gene3,Gene1,spc1,spc2,spc4
Gene4,Gene1,spc1,spc2,spc5,spc3,spc1
etc
And I got the correct results.
But the sample can contains entries like the bellow
GeneX,GeneY,GeneP,spc1,spc2
GeneY,spc3,spc4
The desired result would be
GeneX,GeneY,GeneP,spc1,spc2,spc3,spc4
But the results which the script gives is
GeneX,GeneY,spc3,GeneP,spc1,spc2,spc4
*************************************************************
Also how can i modify the cureent code to give me aoutput like this
Sample input
GeneX,GeneY,GeneP,spc1,spc2
GeneY,spc3,spc4
GeneZ,spc3,spc4
Desired Result
GeneX,GeneY,GeneP,GeneZ,spc1=1,spc2=1,spc3=2,spc4=2
I want to count the number of \/ "spc" for a given "spc" /\ so that i can later confirm the output. because I have a 25 mb txt file to process which will probably take hour or more.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.