Question: How to extract mitogenomes from these fasta files? HELP
gravatar for Andrea.Neobahamut
12 days ago by
Andrea.Neobahamut0 wrote:

Hello, please someone help me to solve this: I have many contigs on fasta format, already ran a BLAST to them against the own database I created Commercial Photography Commercial Photography

The next step I need to do is pulling out the mitogenomes, I heard of two options, grep and using NOVOPLASTY, but I cant find a tutorial that can explain how to extract this from a fasta format I'd appreciate your help, thank you

ADD COMMENTlink modified 11 days ago by h.mon22k • written 12 days ago by Andrea.Neobahamut0

Can you post example contents of the files *.namelist?

ADD REPLYlink written 11 days ago by vkkodali860
gravatar for h.mon
11 days ago by
h.mon22k wrote:

Please don't:

  • write HELP in capitals in your title - it isn't good manners and won't help you get an answer.
  • post large screenshots of text (such as commands, file names and text file contents). It is better to copy and paste those as text inside your question, preferably using the formatting buttons to structure your post.

Please do:

  • explain in detail your problem. For example, what is the "own database" you created? Why do you have several "own databases"? Do you have one contig per file, and many fasta files, or each fasta contains multiple contigs? What is the contents of the namelist files? Do you intend to pull the contigs from the database or from the fastas with contigs?

Some general comments on your code:

1) don't use

for i in `ls ANT198n.fasta*`

It is error-prone, use instead:

for i in ANT198n.fasta*

2) As far as I can tell from your screenshots, ls ANT198n.fasta* will return ANT198n.fasta, so you are using a for loop to loop over just one file - that is, the for loop is unnecessary.

Finally, assuming you want to pull out the hits from the fasta files, you can use samtools:

samtools faidx ANT198n.fasta
samtools faidx ANT198n.fasta $(cat ANT198n.fasta,namelist) >
ADD COMMENTlink modified 11 days ago • written 11 days ago by h.mon22k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1165 users visited in the last hour