Skip to content

nucleotide fasta to Masterfile #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ivaneskos opened this issue Oct 14, 2022 · 14 comments
Open

nucleotide fasta to Masterfile #49

ivaneskos opened this issue Oct 14, 2022 · 14 comments

Comments

@ivaneskos
Copy link

ivaneskos commented Oct 14, 2022

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

@kikinocka
Copy link

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

@Adamtaranto
Copy link

Adamtaranto commented Jan 5, 2024

I'm also running into this issue.

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

@TCHeaven
Copy link

+1

@tallnuttrbgv
Copy link

Same problem.

@tallnuttrbgv
Copy link

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
Copy link

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
Copy link

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

@Adamtaranto
Copy link

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 

@tallnuttrbgv
Copy link

tallnuttrbgv commented Feb 3, 2025

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
Copy link

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

@Adamtaranto
Copy link

  • 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.

@tallnuttrbgv
Copy link

tallnuttrbgv commented Feb 3, 2025

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.

@Adamtaranto
Copy link

  • 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.

@tallnuttrbgv
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants