presto.Applications

External application wrappers

presto.Applications.makeBlastnDb(ref_file, db_exec='makeblastdb')

Makes a ublast database file

Parameters:
  • ref_file – the path to the reference database file
  • db_exec – the path to the makeblastdb executable
Returns:

(name and location of the database, handle of the tempfile.TemporaryDirectory)

Return type:

tuple

presto.Applications.makeUBlastDb(ref_file, db_exec='usearch')

Makes a ublast database file

Parameters:
  • ref_file – path to the reference database file.
  • db_exec – path to the usearch executable.
Returns:

(location of the database, handle of the tempfile.NamedTemporaryFile)

Return type:

tuple

presto.Applications.runBlastn(seq, database, evalue=1e-05, max_hits=100, aligner_exec='blastn')

Aligns a sequence against a reference database using BLASTN

Parameters:
  • seq – a list of SeqRecord objects to align.
  • database – the path and name of the blastn database.
  • evalue – the E-value cut-off.
  • maxhits – the maximum number of hits returned.
  • aligner_exec – the path to the blastn executable.
Returns:

Alignment results.

Return type:

pandas.DataFrame

presto.Applications.runMuscle(seq_list, aligner_exec='muscle')

Multiple aligns a set of sequences using MUSCLE

Parameters:
  • seq_list – a list of SeqRecord objects to align
  • aligner_exec – the MUSCLE executable
Returns:

Multiple alignment results.

Return type:

Bio.Align.MultipleSeqAlignment

presto.Applications.runUBlast(seq, database, evalue=1e-05, max_hits=100, aligner_exec='usearch')

Aligns a sequence against a reference database using the usearch_local algorithm of USEARCH

Parameters:
  • seq – a list of SeqRecord objects to align.
  • database – the path to the ublast database or a fasta file.
  • evalue – the E-value cut-off.
  • maxhits – the maximum number of hits returned.
  • aligner_exec – the path to the usearch executable.
Returns:

Alignment results.

Return type:

pandas.DataFrame

presto.Applications.runUClust(seq_list, ident=0.9, seq_start=0, seq_end=None, cluster_exec='usearch')

Cluster a set of sequences using the UCLUST algorithm from USEARCH

Parameters:
  • seq_list – a list of SeqRecord objects to align.
  • ident – the sequence identity cutoff to be passed to usearch.
  • seq_start – the start position to trim sequences at before clustering.
  • seq_end – the end position to trim sequences at before clustering.
  • cluster_exec – the path to the usearch executable.
Returns:

{sequence id: cluster id}.

Return type:

dict