snipgenie package
Submodules
snipgenie.gui module
snipgenie GUI. Created Jan 2020 Copyright (C) Damien Farrell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- class snipgenie.gui.App(filenames=[], project=None)[source]
Bases:
QMainWindow
GUI Application using PySide2 widgets
- add_file(filter='Fasta Files(*.fa *.fna *.fasta)', path=None)[source]
Add a file to the config folders
- align_files(progress_callback)[source]
Run gene annotation for input files. progress_callback: signal for indicating progress in gui
Create the menu bar for the application.
Add preset genomes to menu
- missing_sites(progress_callback=None)[source]
Find missing sites in each sample - useful for quality control
- run_threaded_process(process, on_complete)[source]
Execute a function in the background with a worker
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
Update plugins
- class snipgenie.gui.AppOptions(parent=None)[source]
Bases:
BaseOptions
Class to provide a dialog for global plot options
- class snipgenie.gui.Communicate[source]
Bases:
QObject
- newproj
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.gui.StdoutRedirect(*param)[source]
Bases:
QObject
- printOccur
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.gui.Worker(fn, *args, **kwargs)[source]
Bases:
QRunnable
Worker thread for running background tasks.
- class snipgenie.gui.WorkerSignals[source]
Bases:
QObject
Defines the signals available from a running worker thread. Supported signals are: finished
No data
- error
tuple (exctype, value, traceback.format_exc() )
- result
object data returned from processing, anything
- error
- finished
- progress
- result
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
snipgenie.widgets module
Qt widgets for snpgenie. Created Jan 2020 Copyright (C) Damien Farrell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- class snipgenie.widgets.BaseOptions(parent=None, opts={}, groups={})[source]
Bases:
object
Class to generate widget dialog for dict of options
- class snipgenie.widgets.BasicDialog(parent, table, title=None)[source]
Bases:
QDialog
Qdialog for table operations interfaces
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.BrowserViewer(parent=None)[source]
Bases:
QDialog
Browser widget
method called by the line edit when return key is pressed getting url and converting it to QUrl object
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.ColorButton(*args, color=None, **kwargs)[source]
Bases:
QPushButton
Custom Qt Widget to show a chosen color.
Left-clicking the button shows the color-chooser, while right-clicking resets the color to None (no-color).
- colorChanged
- onColorPicker()[source]
Show color-picker dialog to select color. Qt will use the native dialog by default.
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.DynamicDialog(parent=None, options={}, groups=None, title='Dialog')[source]
Bases:
QDialog
Dynamic form using baseoptions
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.Editor(parent=None, fontsize=12, **kwargs)[source]
Bases:
QTextEdit
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.FileViewer(parent=None, filename=None)[source]
Bases:
QDialog
Sequence records features viewer
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.GraphicalBamViewer(parent=None, filename=None)[source]
Bases:
QDialog
Alignment viewer with pylab
- load_data(bam_file, ref_file, gb_file=None, vcf_file=None)[source]
Load reference seq and get contig/chrom names
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.MergeDialog(parent, table, df2, title='Merge Tables')[source]
Bases:
BasicDialog
Dialog to melt table
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.MultipleInputDialog(parent, options=None, title='Input', width=400, height=200)[source]
Bases:
QDialog
Qdialog with multiple inputs
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.PlainTextEditor(parent=None, **kwargs)[source]
Bases:
QPlainTextEdit
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.PlotViewer(parent=None)[source]
Bases:
QWidget
matplotlib plots widget
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.PreferencesDialog(parent, options={})[source]
Bases:
QDialog
Preferences dialog from config parser options
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.SimpleBamViewer(parent=None, filename=None)[source]
Bases:
QDialog
Sequence records features viewer using dna_features_viewer
- load_data(bam_file, ref_file, gb_file=None, vcf_file=None)[source]
Load reference seq and get contig/chrom names
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.TableViewer(parent=None, dataframe=None, **kwargs)[source]
Bases:
QDialog
View row of data in table
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.TextViewer(parent=None, text='', width=200, height=400, title='Text')[source]
Bases:
QDialog
Plain text viewer
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- class snipgenie.widgets.ToolBar(table, parent=None)[source]
Bases:
QWidget
Toolbar class
- staticMetaObject = <PySide2.QtCore.QMetaObject object>
- snipgenie.widgets.addToolBarItems(toolbar, parent, items)[source]
Populate toolbar from dict of items
- snipgenie.widgets.dialogFromOptions(parent, opts, sections=None, wrap=2, section_wrap=4, style=None)[source]
Get Qt widgets dialog from a dictionary of options. :param opts: options dictionary :param sections: :param section_wrap: how many sections in one row :param style: stylesheet css if required
snipgenie.tools module
Various methods for bacterial genomics. Created Nov 2019 Copyright (C) Damien Farrell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- snipgenie.tools.batch_iterator(iterator, batch_size)[source]
Returns lists of length batch_size.
This can be used on any iterator, for example to batch up SeqRecord objects from Bio.SeqIO.parse(…), or to batch Alignment objects from Bio.AlignIO.parse(…), or simply lines from a file handle.
This is a generator function, and it returns lists of the entries from the supplied iterator. Each list will have batch_size entries, although the final list may be shorter.
- snipgenie.tools.blast_sequences(database, seqs, labels=None, **kwargs)[source]
Blast a set of sequences to a local or remote blast database :param database: local or remote blast db name
‘nr’, ‘refseq_protein’, ‘pdb’, ‘swissprot’ are valide remote dbs
- Parameters
seqs – sequences to query, list of strings or Bio.SeqRecords
labels – list of id names for sequences, optional but recommended
- Returns
pandas dataframe with top blast results
- snipgenie.tools.clustal_alignment(filename=None, seqs=None, command='clustalw')[source]
Align 2 sequences with clustal
- snipgenie.tools.core_alignment_from_vcf(vcf_file, callback=None, uninformative=False, missing=False, omit=None)[source]
Get core SNP site calls as sequences from a multi sample vcf file. :param vcf_file: multi-sample vcf (e.g. produced by app.variant_calling) :param uninformative: whether to include uninformative sites :param missing: whether to include sites with one or more missing samples (ie. no coverage) :param omit: list of samples to exclude if required
- snipgenie.tools.dataframe_to_fasta(df, seqkey='translation', idkey='locus_tag', descrkey='description', outfile='out.faa')[source]
Genbank features to fasta file
- snipgenie.tools.fasta_to_dataframe(infile, header_sep=None, key='name', seqkey='sequence')[source]
Get fasta proteins into dataframe
- snipgenie.tools.fastq_quality_report(filename, figsize=(7, 5), **kwargs)[source]
Fastq quality plots
- snipgenie.tools.fastq_random_seqs(filename, size=50)[source]
Random sequences from fastq file. Requires pyfastx. Creates a fastq index which will be a large file.
- snipgenie.tools.fastq_to_dataframe(filename, size=5000)[source]
Convert fastq to dataframe. size: limit to the first reads of total size, use None to get all reads Returns: dataframe with reads
- snipgenie.tools.fastq_to_fasta(filename, out, size=1000)[source]
Convert fastq to fasta size: limit to the first reads of total size
- snipgenie.tools.fastq_to_rec(filename, size=50)[source]
Get reads from a fastq file :param size: limit
Returns: biopython seqrecords
- snipgenie.tools.fetch_sra_reads(df, path)[source]
Download a set of reads from SRA using dataframe with runs
- snipgenie.tools.genbank_to_dataframe(infile, cds=False)[source]
Get genome records from a genbank file into a dataframe returns a dataframe with a row for each cds/entry
- snipgenie.tools.get_attributes(obj)[source]
Get non hidden and built-in type object attributes that can be persisted
- snipgenie.tools.get_blast_results(filename)[source]
Get blast results into dataframe. Assumes column names from local_blast method. :returns: dataframe
- snipgenie.tools.get_mean_depth(bam_file, chrom=None, start=None, end=None, how='mean')[source]
Get mean depth from bam file
- snipgenie.tools.get_sb_number(binary_str)[source]
Get SB number from binary pattern usinf database reference
- snipgenie.tools.get_spoligotype(filename, reads_limit=3000000, threshold=2, threads=4)[source]
Get mtb spoligotype from WGS reads
- snipgenie.tools.get_spoligotypes(samples, spo=None)[source]
Get spoligotypes for multiple M.bovis strains
- snipgenie.tools.get_subsample_reads(filename, outpath, reads=10000)[source]
Sub-sample a fastq file with first n reads. :param filename: input fastq.gz file :param outpath: output directory to save new file :param reads: how many reads to sample from start
- snipgenie.tools.get_unique_snps(names, df, present=True)[source]
Get snps unique to one or more samples from a SNP matrix. :param name: name of sample(s) :param df: snp matrix from app.get_aa_snp_matrix(csq) :param present: whether snp should be present/absent
- snipgenie.tools.gff_bcftools_format(in_file, out_file)[source]
Convert a genbank file to a GFF format that can be used in bcftools csq. see https://github.com/samtools/bcftools/blob/develop/doc/bcftools.txt#L1066-L1098. :param in_file: genbank file :param out_file: name of GFF file
- snipgenie.tools.kraken(file1, file2='', dbname='STANDARD16', threads=4)[source]
Run kraken2 on single/paired end fastq files
- snipgenie.tools.local_blast(database, query, output=None, maxseqs=50, evalue=0.001, compress=False, cmd='blastn', threads=4, show_cmd=False, **kwargs)[source]
Blast a local database. :param database: local blast db name :param query: sequences to query, list of strings or Bio.SeqRecords
- Returns
pandas dataframe with top blast results
- snipgenie.tools.make_blast_database(filename, dbtype='nucl')[source]
Create a blast db from fasta file
- snipgenie.tools.pdf_qc_reports(filenames, outfile='qc_report.pdf')[source]
Save pdf reports of fastq file quality info
- snipgenie.tools.plot_fastq_qualities(filename, ax=None, limit=10000)[source]
Plot fastq qualities for illumina reads.
- snipgenie.tools.records_to_dataframe(records, cds=False, nucl_seq=False)[source]
Get features from a biopython seq record object into a dataframe :param features: Bio SeqFeatures :param returns: a dataframe with a row for each cds/entry.
- snipgenie.tools.remote_blast(db, query, maxseqs=50, evalue=0.001, **kwargs)[source]
Remote blastp. :param query: fasta file with sequence to blast :param db: database to use - nr, refseq_protein, pdb, swissprot
- snipgenie.tools.resource_path(relative_path)[source]
Get absolute path to resource, works for dev and for PyInstaller
- snipgenie.tools.samtools_depth(bam_file, chrom=None, start=None, end=None)[source]
Get depth from bam file
- snipgenie.tools.samtools_tview(bam_file, chrom, pos, width=200, ref='', display='T')[source]
View bam alignment with samtools
- snipgenie.tools.set_attributes(obj, data)[source]
Set attributes from a dict. Used for restoring settings in tables
- snipgenie.tools.snp_dist_matrix(aln)[source]
Get pairwise snps distances from biopython Multiple Sequence Alignment object. returns: pandas dataframe
- snipgenie.tools.trim_reads(filename1, filename2, outpath, quality=20, method='cutadapt', threads=4)[source]
Trim adapters using cutadapt
snipgenie.app module
snipgenie methods for cmd line tool. Created Nov 2019 Copyright (C) Damien Farrell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warroanty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- class snipgenie.app.WorkFlow(**kwargs)[source]
Bases:
object
Class for implementing a prediction workflow from a set of options
- snipgenie.app.align_reads(df, idx, outdir='mapped', callback=None, aligner='bwa', platform='illumina', unmapped=None, **kwargs)[source]
Align multiple files. Requires a dataframe with a ‘sample’ column to indicate paired files grouping. If a trimmed column is present these files will align_reads instead of the raw ones. :param df: dataframe with sample names and filenames :param idx: index name :param outdir: output folder :param unmapped_dir: folder for unmapped files if required
- snipgenie.app.blast_contaminants(filename, limit=2000, random=False, pident=98, qcovs=90)[source]
Blast reads to contaminants database Returns: percentages of reads assigned to each species.
- snipgenie.app.check_samples_aligned(samples, outdir)[source]
Check how many samples already aligned
- snipgenie.app.clean_bam_files(samples, path, remove=False)[source]
Check if any bams in output not in samples and remove. Not used in workflow.
- snipgenie.app.get_files_from_paths(paths, ext='*.f*q.gz', filter_list=None)[source]
Get files in multiple paths. :param ext: wildcard for file types to parse eg. *.f*q.gz] :param filter_list: list of labels that should be present in the filenames, optional
- snipgenie.app.get_pivoted_samples(df)[source]
Get pivoted samples by pair, returns a table with one sample per row and filenames in separate columns.
- snipgenie.app.get_samples(filenames, sep='-', index=0)[source]
Get sample pairs from list of files, usually fastq. This returns a dataframe of unique sample labels for the input and tries to recognise the paired files. :param sep: separator to split name on :param index: placement of label in split list, default 0
- snipgenie.app.mask_filter(vcf_file, mask_file, overwrite=False, outdir=None)[source]
Remove any masked sites using a bed file, overwrites input
- snipgenie.app.mpileup_multiprocess(bam_files, ref, outpath, threads=4, callback=None)[source]
Run mpileup in parallel over multiple files and make separate bcfs. Assumes alignment to a bacterial reference with a single chromosome.
- snipgenie.app.mpileup_parallel(bam_files, ref, outpath, threads=4, callback=None, tempdir=None)[source]
Run mpileup in over multiple regions with GNU parallel on linux or rush on Windows Separate bcf files are then joined together. Assumes alignment to a bacterial reference with a single chromosome.
- snipgenie.app.mpileup_region(region, out, bam_files, callback=None)[source]
Run bcftools for single region.
- snipgenie.app.overwrite_vcf(vcf_file, sites, outdir=None)[source]
Make a new vcf with subset of sites
- snipgenie.app.run_bamfiles(bam_files, ref, gff_file=None, mask=None, outdir='.', threads=4, sep='_', labelindex=0, samples=None, **kwargs)[source]
Run workflow with bam files from a previous sets of alignments. We can arbitrarily combine results from multiple other runs this way. kwargs are passed to variant_calling method. Should write a samples.txt file in the outdir if vcf header is to be relabelled. :param samples: dataframe of sample names, if not provided try to get from bam files
- snipgenie.app.site_proximity_filter(vcf_file, dist=10, overwrite=False, outdir=None)[source]
Remove any pairs of sites within dist of each other. :param vcf_file: input vcf file with positions to filter :param dist: distance threshold :param overwrite: whether to overwrite the vcf
- snipgenie.app.trim_files(df, outpath, overwrite=False, threads=4, quality=30)[source]
Batch trim fastq files
snipgenie.aligners module
Aligner methods for bacterial genomics. Created Nov 2019 Copyright (C) Damien Farrell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- snipgenie.aligners.bowtie_align(file1, file2, idx, out, unmapped=None, threads=2, overwrite=False, verbose=True, options='')[source]
Map reads using bowtie
- snipgenie.aligners.build_bowtie_index(fastafile, path=None)[source]
Build a bowtie index :param fastafile: file input :param path: folder to place index files
- snipgenie.aligners.build_bwa_index(fastafile, path=None, show_cmd=True, overwrite=True)[source]
Build a bwa index
- snipgenie.aligners.bwa_align(file1, file2, idx, out, threads=4, overwrite=False, options='', filter=None, unmapped=None)[source]
Align reads to a reference with bwa. :param file1: fastq files :param file2: fastq files :param idx: bwa index name :param out: output bam file name :param options: extra command line options e.g. -k INT for seed length :param unmapped: path to file for unmapped reads if required
snipgenie.plotting module
Plotting methods for snpgenie Created Jan 2020 Copyright (C) Damien Farrell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- snipgenie.plotting.create_grid(gdf=None, bounds=None, n_cells=10, overlap=False, crs='EPSG:29902')[source]
Create square grid that covers a geodataframe area or a fixed boundary with x-y coords returns: a GeoDataFrame of grid polygons
- snipgenie.plotting.create_hex_grid(gdf=None, bounds=None, n_cells=10, overlap=False, crs='EPSG:29902')[source]
Hexagonal grid over geometry. See https://sabrinadchan.github.io/data-blog/building-a-hexagonal-cartogram.html
- snipgenie.plotting.display_igv(url='http://localhost:8888/files/', ref_fasta='', bams=[], gff_file=None, vcf_file=None)[source]
Display IGV tracks in jupyter, requires the igv_jupyterlab package. Example usage:
bams = {‘24’:’results/mapped/24-MBovis.bam’} igv=display_igv(url=’http://localhost:8888/files/’, ref_fasta=’Mbovis_AF212297.fa’,
gff_file=’results/Mbovis_AF212297.gb.gff’, vcf_file=’results/filtered.vcf.gz’, bams=bams)
- snipgenie.plotting.draw_pie(vals, xpos, ypos, colors, size=500, ax=None)[source]
Draw a pie at a specific position on an mpl axis. Used to draw spatial pie charts on maps. :param vals: values for pie :param xpos: x coord :param ypos: y coord :param colors: colors of values :param size: size of pie chart
- snipgenie.plotting.gen_colors(cmap, n, reverse=False)[source]
Generates n distinct color from a given colormap. :param cmap: The name of the colormap you want to use.
Refer https://matplotlib.org/stable/tutorials/colors/colormaps.html to choose Suggestions: For Metallicity in Astrophysics: Use coolwarm, bwr, seismic in reverse For distinct objects: Use gnuplot, brg, jet,turbo.
- Parameters
n (int) – Number of colors you want from the cmap you entered.
reverse (bool) – False by default. Set it to True if you want the cmap result to be reversed.
- Returns
A list with hex values of colors.
- Return type
colorlist(list)
Taken from the mycolorpy package by binodbhttr see also https://matplotlib.org/stable/tutorials/colors/colormaps.html
- snipgenie.plotting.get_bam_aln(bam_file, chr, start, end, group=False)[source]
Get all aligned reads from a sorted bam file for within the given coords
- snipgenie.plotting.get_color_mapping(df, col, cmap=None, seed=1)[source]
Get random color map for categorcical dataframe column
- snipgenie.plotting.get_coverage(bam_file, chr, start, end)[source]
Get coverage from bam file at specified region
- snipgenie.plotting.get_fasta_sequence(filename, start, end, key=0)[source]
Get chunk of indexed fasta sequence at start/end points
- snipgenie.plotting.heatmap(df, cmap='gist_gray_r', w=15, h=5, ax=None)[source]
Plot dataframe matrix
- snipgenie.plotting.make_legend(fig, colormap, loc=(1.05, 0.6), title='', fontsize=12)[source]
Make a figure legend wth provided color mapping
- snipgenie.plotting.plot_bam_alignment(bam_file, chr, xstart, xend, ystart=0, yend=100, rect_height=0.6, fill_color='gray', ax=None)[source]
bam alignments plotter. :param bam_file: name of a sorted bam file :param start: start of range to show :param end: end of range
- snipgenie.plotting.plot_coverage(df, plot_width=800, plot_height=60, xaxis=True, ax=None)[source]
Plot a bam coverage dataframe returned from get_coverage :param df: dataframe of coverage data (from get_coverage) :param plot_width: width of plot :param xaxis: plot the x-axis ticks and labels
snipgenie.trees module
Tree methods for bacterial phylogenetics, mostly using ete3. Created Nov 2019 Copyright (C) Damien Farrell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- snipgenie.trees.colors_from_labels(df, name, group)[source]
Colors from dataframe columns for use with an ete3 tree drawing
- snipgenie.trees.create_tree(filename=None, tree=None, ref=None, labelmap=None, colormap=None, color_bg=False, format=1)[source]
Draw a tree
- snipgenie.trees.run_RAXML(infile, name='variants', threads=8, bootstraps=100, outpath='.')[source]
Run Raxml pthreads. :returns: name of .tree file.
snipgenie.simulate module
Simulate reads Created Sep 2022 Copyright (C) Damien Farrell
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- snipgenie.simulate.artificial_fastq_generator(ref, outfile, cmp=100)[source]
Generate reads from reference