Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ conda convert -p osx-64 $(find build -name "falmeida-py*.tar.bz2")

# upload osx
anaconda upload $(find osx-64 -name "falmeida-py*.tar.bz2") --force
sleep 140
anaconda upload $(find build/linux-64 -name "falmeida-py*.tar.bz2") --force

# rm dirs
Expand Down
2 changes: 1 addition & 1 deletion conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: falmeida-py
version: '1.2.3'
version: '1.2.4'

source:
path: ..
Expand Down
50 changes: 6 additions & 44 deletions docs/align2subsetgbk_help.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,6 @@
A script meant to subset a genbank annotation file based on alignments against a query (Nucleotide) FASTA file

---
Copyright (C) 2020 Felipe Marques de Almeida (almeidafmarques@gmail.com)
License: Public Domain

Usage:
falmeida-py align2subsetgbk [ -h|--help ]
falmeida-py align2subsetgbk [ --gbk <in_gbk> --fasta <fasta> --out <out_gbk> --minid <int> --mincov <int> --culling_limit <int> --extension <int> ]

Options:
-h --help Show this screen.
-g --gbk=<in_gbk> Gbk file for subset
-f --fasta=<fasta> FASTA (nucl) file for querying the gbk
-o --out=<out_gbk> Gbk filtered output file [Default: out.gbk].
--extension=<int> Base pair length to extend the flank regions in the alignment [Default: 0].
--minid=<int> Min. Identity percentage for gene annotation [Default: 80].
--mincov=<int> Min. Covereage for gene annotation [Default: 80].
--culling_limit=<int> Blast culling_limit for best hit only [Default: 1].
falmeida-py: a package to the simple distribution of my custom scripts.

Copyright (C) 2020 Felipe Marques de Almeida (almeidafmarques@gmail.com)
License: Public Domain

usage:
falmeida-py [ -h|--help ] [ -v|--version ] [ --license ]
falmeida-py <command> [ -h|--help ] [ <args>... ]

options:
-h --help Show this screen
-v --version Show version information
--license Show LEGAL LICENSE information

commands:
tsv2markdown Command for rapid convertion of tsv or csv to markdown tables.
splitgbk Command to split multisequence genbank files into individual files.
align2subsetgbk Command to subset genbank files based on alignments to a FASTA file.
gbk2fasta Command to convert genbank files to fasta files.
blasts Command to execute automatized blast commands.
replace_fasta_seq Command to replace strings in a FASTA using defitinitions from a BED file
mpgap2csv Command to summarize main mpgap multiqc assembly statistics into a CSV file
bacannot2json Command to summarize main bacannot annotation results into JSON file

Use: `falmeida-py <commmand> -h` to get more help and see examples.
Traceback (most recent call last):
File "/home/falmeida/Documents/GitHub/pythonScripts/falmeida-py-runner.py", line 18, in <module>
from falmeida_py.__main__ import main
File "/home/falmeida/Documents/GitHub/pythonScripts/falmeida_py/__main__.py", line 47, in <module>
from docopt import docopt
ModuleNotFoundError: No module named 'docopt'
31 changes: 6 additions & 25 deletions docs/help_message.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
falmeida-py: a package to the simple distribution of my custom scripts.

Copyright (C) 2020 Felipe Marques de Almeida (almeidafmarques@gmail.com)
License: Public Domain

usage:
falmeida-py [ -h|--help ] [ -v|--version ] [ --license ]
falmeida-py <command> [ -h|--help ] [ <args>... ]

options:
-h --help Show this screen
-v --version Show version information
--license Show LEGAL LICENSE information

commands:
tsv2markdown Command for rapid convertion of tsv or csv to markdown tables.
splitgbk Command to split multisequence genbank files into individual files.
align2subsetgbk Command to subset genbank files based on alignments to a FASTA file.
gbk2fasta Command to convert genbank files to fasta files.
blasts Command to execute automatized blast commands.
replace_fasta_seq Command to replace strings in a FASTA using defitinitions from a BED file
mpgap2csv Command to summarize main mpgap multiqc assembly statistics into a CSV file
bacannot2json Command to summarize main bacannot annotation results into JSON file

Use: `falmeida-py <commmand> -h` to get more help and see examples.
Traceback (most recent call last):
File "/home/falmeida/Documents/GitHub/pythonScripts/falmeida-py-runner.py", line 18, in <module>
from falmeida_py.__main__ import main
File "/home/falmeida/Documents/GitHub/pythonScripts/falmeida_py/__main__.py", line 47, in <module>
from docopt import docopt
ModuleNotFoundError: No module named 'docopt'
44 changes: 6 additions & 38 deletions docs/splitgbk_help.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,6 @@
A very simple script to split multisequence genbank files into separate files
Copyright (C) 2020 Felipe Marques de Almeida (almeidafmarques@gmail.com)
License: Public Domain

usage:
falmeida-py splitgbk
falmeida-py splitgbk [ -h|--help ]
falmeida-py splitgbk [ --gbk <file> ] [ --outdir <outdir> ]

options:
-h --help Show this screen.
-g --gbk=<file> Input genbank file to split into multiple individual files.
-o --outdir=<outdir> Directory (must already exist) in which to write the splitted files [Default: ./].
falmeida-py: a package to the simple distribution of my custom scripts.

Copyright (C) 2020 Felipe Marques de Almeida (almeidafmarques@gmail.com)
License: Public Domain

usage:
falmeida-py [ -h|--help ] [ -v|--version ] [ --license ]
falmeida-py <command> [ -h|--help ] [ <args>... ]

options:
-h --help Show this screen
-v --version Show version information
--license Show LEGAL LICENSE information

commands:
tsv2markdown Command for rapid convertion of tsv or csv to markdown tables.
splitgbk Command to split multisequence genbank files into individual files.
align2subsetgbk Command to subset genbank files based on alignments to a FASTA file.
gbk2fasta Command to convert genbank files to fasta files.
blasts Command to execute automatized blast commands.
replace_fasta_seq Command to replace strings in a FASTA using defitinitions from a BED file
mpgap2csv Command to summarize main mpgap multiqc assembly statistics into a CSV file
bacannot2json Command to summarize main bacannot annotation results into JSON file

Use: `falmeida-py <commmand> -h` to get more help and see examples.
Traceback (most recent call last):
File "/home/falmeida/Documents/GitHub/pythonScripts/falmeida-py-runner.py", line 18, in <module>
from falmeida_py.__main__ import main
File "/home/falmeida/Documents/GitHub/pythonScripts/falmeida_py/__main__.py", line 47, in <module>
from docopt import docopt
ModuleNotFoundError: No module named 'docopt'
46 changes: 6 additions & 40 deletions docs/tsv2markdown_help.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
A simple script to convert tsv (or csv) files to markdown tables using tabulate!
Copyright (C) 2020 Felipe Marques de Almeida (almeidafmarques@gmail.com)
License: Public Domain

usage:
falmeida-py tsv2markdown
falmeida-py tsv2markdown [ -h|--help ]
falmeida-py tsv2markdown [ --tsv <file> --csv <file> --header <list> ]

options:
-h --help Show this screen.
--tsv=<file> Input tsv file to print as markdown table
--csv=<file> Input csv file to print as markdown table
--header=<list> If file does not have a header, set a
custom header. E.g. --header "Planet,R (km),mass (x 10^29 kg)".
falmeida-py: a package to the simple distribution of my custom scripts.

Copyright (C) 2020 Felipe Marques de Almeida (almeidafmarques@gmail.com)
License: Public Domain

usage:
falmeida-py [ -h|--help ] [ -v|--version ] [ --license ]
falmeida-py <command> [ -h|--help ] [ <args>... ]

options:
-h --help Show this screen
-v --version Show version information
--license Show LEGAL LICENSE information

commands:
tsv2markdown Command for rapid convertion of tsv or csv to markdown tables.
splitgbk Command to split multisequence genbank files into individual files.
align2subsetgbk Command to subset genbank files based on alignments to a FASTA file.
gbk2fasta Command to convert genbank files to fasta files.
blasts Command to execute automatized blast commands.
replace_fasta_seq Command to replace strings in a FASTA using defitinitions from a BED file
mpgap2csv Command to summarize main mpgap multiqc assembly statistics into a CSV file
bacannot2json Command to summarize main bacannot annotation results into JSON file

Use: `falmeida-py <commmand> -h` to get more help and see examples.
Traceback (most recent call last):
File "/home/falmeida/Documents/GitHub/pythonScripts/falmeida-py-runner.py", line 18, in <module>
from falmeida_py.__main__ import main
File "/home/falmeida/Documents/GitHub/pythonScripts/falmeida_py/__main__.py", line 47, in <module>
from docopt import docopt
ModuleNotFoundError: No module named 'docopt'
8 changes: 4 additions & 4 deletions falmeida_py/general_stats_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ def general_stats(bacannot_summary):
# save annotation stats
bacannot_summary[sample]['general_annotation'] = {}
bacannot_summary[sample]['general_annotation']['mlst'] = str(mlst_results[2].item()).replace('-', 'null')
bacannot_summary[sample]['general_annotation']['cds'] = general_results['CDS']
bacannot_summary[sample]['general_annotation']['rrna'] = general_results['rRNA']
bacannot_summary[sample]['general_annotation']['trna'] = general_results['tRNA']
bacannot_summary[sample]['general_annotation']['tmrna'] = general_results['tmRNA']
bacannot_summary[sample]['general_annotation']['cds'] = general_results.get('CDS', 0)
bacannot_summary[sample]['general_annotation']['rrna'] = general_results.get('rRNA', 0)
bacannot_summary[sample]['general_annotation']['trna'] = general_results.get('tRNA', 0)
bacannot_summary[sample]['general_annotation']['tmrna'] = general_results.get('tmRNA', 0)

bacannot_summary[sample]['general_annotation']['closest_reference'] = {}
bacannot_summary[sample]['general_annotation']['closest_reference']['strain'] = refseq_masher_results.head(1)['top_taxonomy_name'].item()
Expand Down
2 changes: 1 addition & 1 deletion falmeida_py/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
If not, see <http://www.gnu.org/licenses/>.
"""

__version__ = '1.2.3'
__version__ = '1.2.4'

def get_version():
return __version__