Mfannot icon indicating copy to clipboard operation
Mfannot copied to clipboard

nucleotide fasta to Masterfile

Open ivaneskos opened this issue 3 years ago • 14 comments

Hi,@natacha-beck ! I am trying to run MFannot locally, from docker-container. Am I right, that the only input format is the Masterfile? How can I get a Masterfile from nucleotide fasta?

I am running sudo docker run nbeck/mfannot mfannot --genetic 4 --outputfile my.out --logfile my.log --T (pwd)/tmp my.fasta

and I have an error
No masterfile found

ivaneskos avatar Oct 14 '22 10:10 ivaneskos

Hi, I am having the same issue. Could you please specify how the master file should look? Single or multi-fasta nucleotide file doesn't work.

Thank you! Kristina

kikinocka avatar Oct 25 '22 10:10 kikinocka

I'm also running into this issue.

@natacha-beck or @bflang could you add a conversion tool to the docker image?

Adamtaranto avatar Jan 05 '24 23:01 Adamtaranto

+1

TCHeaven avatar Nov 20 '24 17:11 TCHeaven

Same problem.

tallnuttrbgv avatar Jan 31 '25 06:01 tallnuttrbgv

I thought this was a binding problem and tried this, but still got an error.

docker run --mount type=bind,src=/media/storage/r12.36_organelle_annotation/mt/,dst=/home/ docker.io/nbeck/mfannot mfannot /home/media/storage/r12.36_organelle_annotation/mt/r12.1_doryanthes_mt.fasta

No masterfile found

docker run --volume /media/storage/r12.36_organelle_annotation/mt/:/home/ docker.io/nbeck/mfannot mfannot /home/media/storage/r12.36_organelle_annotation/mt/r12.1_doryanthes_mt.fasta

No masterfile found

tallnuttrbgv avatar Feb 02 '25 23:02 tallnuttrbgv

Similarly, just trying to list any directory in the container results in a permission denied - so the container is read-only and cannot bind local data.

tallnuttrbgv avatar Feb 02 '25 23:02 tallnuttrbgv

Also tried below. Same error.

docker run -v $(pwd):/work:rw -w /work docker.io/nbeck/mfannot mfannot r12.1_doryanthes_mt.fasta

docker run -ti -v $(pwd):/work -w /work --mount type=tmpfs,destination=/work/tmp docker.io/nbeck/mfannot mfannot r12.1_doryanthes_mt.fasta

tallnuttrbgv avatar Feb 03 '25 01:02 tallnuttrbgv

Hi @tallnuttrbgv, here is a basic workflow that has worked for me. MFAnnot can be a bit temperamental.

# start container, attach dir with genomes as "mito-data"
docker run --rm -it  -v ~/Desktop/mito_test:/mito-data nbeck/mfannot:latest

# Add your custom submitter details file to the correct path
cp mito-data/SubmitterAdam.sbt $MF2SQN_LIB/mf2sqn_Submitters/

# open mito-data dir
cd mito-data 

# Run mfannot
mfannot --sqn -g 4 --logfile my_mito_new.log --outputfile my_mito.masterfile my_mito_genome.fasta

# Create Masterfile with custom submitter data
mf2sqn -d -t -a Adam -m my_mito.masterfile
# Note: May need to re-run after editing my_mito.masterfile.subInfo if the custom submitter info was not picked up correctly.

# Note: Can usually skip this, but may need to manually run the tbl and fsa files through tbl2asn. 
# tbl2asn -i my_mito.masterfile.tbl

# Convert to genbank fmt
# Note: May need to get asn2gb from bioconda if this doesn't work
asn2gb -i my-output.sqn -f b -o my-mito.gbk 

Adamtaranto avatar Feb 03 '25 03:02 Adamtaranto

Thanks! But can you tell me what this is? There is no mention of it I can find in the docs, I do not need a sqn file.

Add your custom submitter details file to the correct path cp mito-data/SubmitterAdam.sbt $MF2SQN_LIB/mf2sqn_Submitters/

tallnuttrbgv avatar Feb 03 '25 03:02 tallnuttrbgv

Also - same error:

docker run --rm -it -v /media/storage/r12.36_organelle_annotation/mt-test/:/mito-data nbeck/mfannot:latest

cd mito-data

root@57e4008fb947:/mito-data# mfannot --logfile my_mito_new.log --outputfile my_mito.masterfile r12.1_doryanthes_mt.fasta No masterfile found

tallnuttrbgv avatar Feb 03 '25 04:02 tallnuttrbgv

  • The sqn file gets converted into your annotated genbank file.
  • Have a look at the example sbt file in $MF2SQN_LIB/mf2sqn_Submitters/ this is where the genome and submitter metadata for the final genbank file come from. The -a opt in mf2sqn will look for an sbt file with format Submitter{name}.sbt.

Can you post the contents of my_mito_new.log, there may be more clues there.

Also check the output of printenv to see if mfannot has set the env variables it needs.

Adamtaranto avatar Feb 03 '25 04:02 Adamtaranto

root@57e4008fb947:/mito-data# cat my_mito_new.log cat: my_mito_new.log: No such file or directory

Do you know where 'printenv' file is?

Also root@57e4008fb947:/mito-data# ls ls: cannot open directory '.': Permission denied

So perhaps a permissions problem?

I think that docker may be a dead-end for me because I need to script annotation of many mitomes. I have local install of mfannot working but without tRNAs - If I include RNAfinder I get "Can't use an undefined value as an ARRAY reference at /g/data/nm31/bin/Mfannot/mfannot line 5746." and it fails. So I may need to run it without RNAfinder and run tRNAscan manually.

Thanks.

tallnuttrbgv avatar Feb 03 '25 04:02 tallnuttrbgv

  • printenv is a linux cmd line tool. You need to run it.

Please run this:

docker run --rm -it -v /media/storage/r12.36_organelle_annotation/mt-test/:/mito-data nbeck/mfannot:latest

whoami 

ls -lah mito-data

Post the results of those two commands.

You may need to change the permissions on the mounted dir, try:

chmod -R 666 mito-data

Then try to run mfannot as before.

Adamtaranto avatar Feb 03 '25 05:02 Adamtaranto

I am using a singularity image now that is working to some extent. Some problems with converting the output, using mfannot2gff.pl at the moment but it can't parse multi gene copies which I am working on. Thanks for your help.

tallnuttrbgv avatar Feb 05 '25 02:02 tallnuttrbgv