Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: remove part of string (DNA)

by sundialsvc4 (Abbot)
on Apr 12, 2011 at 15:45 UTC ( [id://898974]=note: print w/replies, xml ) Need Help??


in reply to remove part of string (DNA)

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: remove part of string (DNA)
by BrowserUk (Patriarch) on Apr 12, 2011 at 15:52 UTC

    Nothing you have said above is even vaguely relevant to the OPs question.

    You get more fatuous by the day. Why? What are you hoping to achieve?

      I am not a Perl expert, and have learned from many authors on PerlMonks, including both BrowserUK and sundialsvc4.

      If the comments by sundialsvc4 are inaccurate or not appropriate for the OP's problem, please tell us why. Pre-sorting the data seems like good advice to me, but I don't have your experience and knowledge of Perl. Please enlighten.

      Thanks.

        Pre-sorting the data seems like good advice to me,

        It is quite the opposite of good advice. Ie very bad advice.

        1. Sorting is O(N logN). The OPs described processing is O(N).

          Sorting does not help the OPs processing at all.

        2. FASTA file are multi-line record format files.

          If you sorted a FASTA file with the system sort utility, it would screw the file up in a completely irrecoverable way.

          Eg. This:

          c:\test>type 845226.fasta >uc002yje.1 chr21:13973492-13976330 cccctgccccaccgcaccctggattactgcacgccaagaccctcacctga acgcgccctacactctggcatgggggaacccggccccgcagagccctgga CTCTGACATTGGAGGACTCCTCGGCTACGTCCTGGACTCCTGCACAAGAG >uc002yje.1 chr21:13973492-13976330 cccctgccccaccgcaccctggattactgcacgccaagaccctcacctga acgcgccctacactctggcatgggggaaaaaacccggccccgcagagccctgga CTCTGACATTGGAGGACTCCTCGGCTACGTCCTGGACTCCTGCACAAGAG >uc002yje.1 chr21:13973492-13976330 cccctgccccaccgcaccctggattactgcacgccaagaccctcacctga acgcgccctacactctggcatgggggaacccggccccgcagagggccctgga CTCTGACATTGGAGGACTCCTCGGCTACGTCCTGGACTCCTGCACAAGAG

          becomes this:

          c:\test>sort 845226.fasta >uc002yje.1 chr21:13973492-13976330 >uc002yje.1 chr21:13973492-13976330 >uc002yje.1 chr21:13973492-13976330 acgcgccctacactctggcatgggggaaaaaacccggccccgcagagccctgga acgcgccctacactctggcatgggggaacccggccccgcagagccctgga acgcgccctacactctggcatgggggaacccggccccgcagagggccctgga cccctgccccaccgcaccctggattactgcacgccaagaccctcacctga cccctgccccaccgcaccctggattactgcacgccaagaccctcacctga cccctgccccaccgcaccctggattactgcacgccaagaccctcacctga CTCTGACATTGGAGGACTCCTCGGCTACGTCCTGGACTCCTGCACAAGAG CTCTGACATTGGAGGACTCCTCGGCTACGTCCTGGACTCCTGCACAAGAG CTCTGACATTGGAGGACTCCTCGGCTACGTCCTGGACTCCTGCACAAGAG

          And so is rendered entirely useless.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        BrowserUK is right (identifier and sequence should remain together), but they'll be sorted before exporting them to a fasta file. But I don't think it would really make a difference in speed anyway.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://898974]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (9)
As of 2024-04-19 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found