Giter Site home page Giter Site logo

xthua / bacant Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 7.0 50.96 MB

This program is designed for annotation of antimicrobal resistance(AMR), transposon(Tn) and integron(In) in bacteria.

License: GNU General Public License v3.0

Python 5.18% F* 94.80% Shell 0.02%
amr bacteria fasta integron transposon

bacant's People

Contributors

chasefor avatar xthua avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bacant's Issues

Number appended after sequence name in annotation.tsv file

Hi,

Thank you for creating this nice tool.

It seems, I have an bug in my annotation.tsv output with bacant.

Below is how my input fasta looks like:

$ grep '>' filename.fasta
>Ctg1_len_5201677_depth_1.00x_circ
>Ctg2_len_135212_depth_2.08x_circ
>Ctg3_len_67445_depth_4.02x_circ

The annotation.tsv appends a number in the sequence name:

egrep 'circ1|circ2' annotation.tsv
Ctg1_len_5201677_depth_1.00x_circ2	resistance	gene	939	1799	.	-	.	locus_tag=Ctg1_len_5201677_depth_1.00x_circ2;gene=blaTEM-116;db_xref=ResDB;Note=BETA-LACTAM
Ctg1_len_5201677_depth_1.00x_circ2	resistance	CDS	939	1799	.	-	.	locus_tag=Ctg1_len_5201677_depth_1.00x_circ2;CDS=blaTEM-116;db_xref=ResDB;Note=BETA-LACTAM
Ctg1_len_5201677_depth_1.00x_circ1	resistance	gene	613	933	.	-	.	locus_tag=Ctg1_len_5201677_depth_1.00x_circ1;gene=ble_Tn5;db_xref=ResDB;Note=BLEOMYCIN
Ctg1_len_5201677_depth_1.00x_circ1	resistance	CDS	613	933	.	-	.	locus_tag=Ctg1_len_5201677_depth_1.00x_circ1;CDS=ble_Tn5;db_xref=ResDB;Note=BLEOMYCIN
Ctg1_len_5201677_depth_1.00x_circ1	resistance	gene	954	1748	.	-	.	locus_tag=Ctg1_len_5201677_depth_1.00x_circ1;gene=aph(3')-IIa;db_xref=ResDB;Note=KANAMYCIN
Ctg1_len_5201677_depth_1.00x_circ1	resistance	CDS	954	1748	.	-	.	locus_tag=Ctg1_len_5201677_depth_1.00x_circ1;CDS=aph(3')-IIa;db_xref=ResDB;Note=KANAMYCIN

Not all the gene annotations are like this but a few of them are as above. Any help appreciated!

FileNotFoundError: [Errno 2] No such file or directory: 'Bacant_out/annotation.gb'

Dear developer,
Thanks for your such good job.
My issue is that "FileNotFoundError: [Errno 2] No such file or directory: 'Bacant_out/annotation.gb'" occurenced and command line is

bacant -n ISO_1051.fna -o  Bacant_out/

and output:

-rw-r--r--  1 yu husn  150 Jun  1 21:27 AMR.possible.xls
-rw-r--r--  1 yu husn  150 Jun  1 21:27 AMR.xls
-rw-r--r--  1 yu husn  603 Jun  1 21:27 gb_location.txt
drwxr-xr-x  2 yu husn 4.0K Jun  1 21:27 multi_contig
-rw-r--r--  1 yu husn 2.9M Jun  1 21:27 nucleotide.fasta
-rw-r--r--  1 yu husn   20 Jun  1 21:27 nucleotide.integrons
-rw-r--r--  1 yu husn   58 Jun  1 21:27 replicon.tsv
drwxr-xr-x 50 yu husn 4.0K Jun  1 21:27 Results_Integron_Finder_nucleotide
-rw-r--r--  1 yu husn    7 Jun  1 21:27 seqLen.txt
-rw-r--r--  1 yu husn    5 Jun  1 21:27 tmp.fasta
-rw-r--r--  1 yu husn  162 Jun  1 21:27 transposon.filter.xls
-rw-r--r--  1 yu husn  162 Jun  1 21:27 transposon.possible.xls

but the results except header line without anything.
and log:

Analysing file /share/disk6/yutao/test/ISO_1051.fna  at 2021-06-01 21:27:27
replicon search done
AMR done
transposon done
integron_finder done
Traceback (most recent call last):
  File "/home/yu/.local/bin/bacant", line 8, in <module>
    sys.exit(run())
  File "/home/yu/.local/lib/python3.7/site-packages/BacAnt/bacant.py", line 1194, in run
    merge_genbank(resultdir)
  File "/home/yu/.local/lib/python3.7/site-packages/BacAnt/bacant.py", line 1011, in merge_genbank
    for rec in SeqIO.parse(annotation_file,'genbank'):
  File "/home/yu/.local/lib/python3.7/site-packages/Bio/GenBank/Scanner.py", line 514, in parse_records
    with as_handle(handle, "rU") as handle:
  File "/home/miniconda2/envs/denovo/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/home/yu/.local/lib/python3.7/site-packages/Bio/File.py", line 120, in as_handle
    with open(handleish, mode, **kwargs) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'Bacant_out/annotation.gb'

Looking forward your reply

integron_finder error

Hi @xthua ,

Sorry to bother again. After the bacant update to v3.3.4, I get the integron_finder error.

I do not see the annotation.tsv file in the results folder either. This was not a problem in v3.3.3.

I have create a new environment with bacant v3.3.4, but with no success.

$ conda create -n bacant2

$ conda activate bacant2

$ conda install -c bacant -c conda-forge -c bioconda bacant

$ time bacant -n filename.fasta -o filename_bacant_out
Analysing file /home/user/filename.fasta  at 2022-09-02 12:10:32
replicon search done
integron_finder error
AMR done
transposon done
All Done  at 2022-09-02 12:10:59

may I know if I am missing something.

assembly draft visulization problem

hi,I have tested bacant with genomic assembly drafts, however there w no html files created. Would you like to help me with this issue?
Thanks a lot.

Updated database?

The tool developed by the author is very good, but the software has not been updated for a long time, and the database is also the same. Could the author provide some scripts for building the database? For example, I can only find the corresponding web version for the data of transposon and integron at present

Problem with the name of Res.fasta and questions about replicons

Hi,

Thank you for developping this tool. It is really great to be able to annotate several elements in one command line. After running Bacant v3.4.0 on some genomes I have some comments and questions:

  • I suppose this is a typo in the output: annotaion.htlm. And that it should be annotation.htlm?
  • I downloaded the last database (v3.1) and when using this database (with the option -p), my outputs for resistance genes were all empty. I realized that in the version 3.1 the files are called Res.fasta.n* instead of Res.n.*. There was no error message though, intead the message said "AMR done", like if it worked fine. Would it be possible to add a checking for the db, in addition of the checking of the fasta file?
  • By the way, for replicons, the name of the file is replicon.fasta.n**, which is what is indeed read by bacant (no need to rename it contraty to Res.fasta).
  • If I am not mistaken, there is no mention of Replicons in the article Would it be possible to speak about them in the README? Would it be possible to have some information on that? Where does the database come from? What are the blast parameters (since we cannot set -c and -i on those) ? Is there anything else other than the blast done? I was also wondering whether it would be possible in a next version to add the replicons to the annotation.tsv?
  • And finally, would you have any advice on how to choose the -c and -i parameters?

Thank you

ValueError: could not convert string to float: '90,90,90'

A very useful tool, but I encountered the following problem during the use process and don't know how to handle it

Code used:
$ bacant --indir /data/users/kxytry/infile -o outdir

Error prompt
Traceback (most recent call last):
File "/data/users/kxy/miniconda3/envs/bacant/bin/bacant", line 33, in
sys.exit(load_entry_point('BacAnt==3.3.2', 'console_scripts', 'bacant')())
File "/data/users/kxy/miniconda3/envs/bacant/lib/python3.7/site-packages/BacAnt-3.3.2-py3.7.egg/BacAnt/bacant.py", line 1135, in run
process_dir(blastn_path,indir,resultdir)
File "/data/users/kxy/miniconda3/envs/bacant/lib/python3.7/site-packages/BacAnt-3.3.2-py3.7.egg/BacAnt/bacant.py", line 881, in process_dir
ident0 = float(ident0)
ValueError: could not convert string to float: '90,90,90'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.