Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^2: remove part of string (DNA)

by BrowserUk (Pope)
on Apr 12, 2011 at 15:52 UTC ( #898979=note: print w/replies, xml ) Need Help??

in reply to Re: remove part of string (DNA)
in thread remove part of string (DNA)

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?

Replies are listed 'Best First'.
Re^3: remove part of string (DNA) ... More off-topic
by clp (Friar) on Apr 12, 2011 at 18:28 UTC
    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.


      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://898979]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-04-27 07:35 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (501 votes). Check out past polls.