Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: remove part of string (DNA) ... More off-topic

by BrowserUk (Patriarch)
on Apr 12, 2011 at 19:15 UTC ( [id://899033]=note: print w/replies, xml ) Need Help??


in reply to Re^3: remove part of string (DNA) ... More off-topic
in thread remove part of string (DNA)

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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-18 18:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found