Skip to content

Commit

Permalink
Corrected spelling errors in main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
arivers committed Jul 6, 2018
1 parent 599359a commit 1c3f280
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions itsxpress/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def __init__(self, uc_file, rep_file, seq_file):

def _get_trimmed_seq_generator(self, seqgen, itspos):
"""This function takes a Biopython SeqIO sequence generator of sequences, and
returns a generator of trimmed sequecnes. Sequences where the ITS ends could
returns a generator of trimmed sequences. Sequences where the ITS ends could
not be determined are ommited.
Args:
Expand Down Expand Up @@ -282,7 +282,7 @@ def _filterfunc(record):
return False

def map_func(record):
"""Trims the record down to to correct region
"""Trims the record down to correct region
Args:
record (obj): a Biopython SeqRecord object
Expand Down Expand Up @@ -340,7 +340,7 @@ class SeqSample:
tempdir (obj): A temporary directory object
fastq (str): The path to the input fastq file
uc_file (str): The path to the Vsearch uc mapping file
rep_file: (str) the path to the representitive seequences fasta file created by Vsearch
rep_file: (str) the path to the representative sequences fasta file created by Vsearch
seq_file (str): the location of the fastq or fastq.gz sequence file used for analysis
"""
Expand All @@ -367,7 +367,7 @@ def _deduplicate(self, threads=1):
"""Runs Vsearch dereplication to create a fasta file of nonredundant sequences.
Args:
threads (int or str):the number of prosessor threads to use
threads (int or str):the number of processor threads to use
"""
try:
Expand All @@ -387,7 +387,7 @@ def _deduplicate(self, threads=1):
logging.exception("Could not perform dereplication with Vsearch. Error from Vsearch was:\n {}".format(p2.stderr.decode('utf-8')))
raise e
except FileNotFoundError as f:
logging.error("Vsearch was not found, make sure Vsearch is installed and executible")
logging.error("Vsearch was not found, make sure Vsearch is installed and executable")
raise f

def _search(self, hmmfile, threads=1):
Expand All @@ -408,10 +408,10 @@ def _search(self, hmmfile, threads=1):
p4 = subprocess.run(parameters,stderr=subprocess.PIPE, stdout=subprocess.DEVNULL)
p4.check_returncode()
except subprocess.CalledProcessError as e :
logging.exception("Could not perform ITS identificaton with hmmserach. The error was:\n {}".format(p4.stderr.decode('utf-8')))
logging.exception("Could not perform ITS identification with hmmserach. The error was:\n {}".format(p4.stderr.decode('utf-8')))
raise e
except FileNotFoundError as f:
logging.error("hmmsearch was not found, make sure HMMER3 is installed and executible")
logging.error("hmmsearch was not found, make sure HMMER3 is installed and executable")
raise f

class SeqSamplePairedInterleaved(SeqSample):
Expand All @@ -436,7 +436,7 @@ def _merge_reads(self, threads):
logging.exception("could not perform read merging with BBmerge. Error from BBmerge was: \n {}".format(p1.stderr.decode('utf-8')))
raise e
except FileNotFoundError as f:
logging.error("BBmerge was not found, make sure BBmerge is executible")
logging.error("BBmerge was not found, make sure BBmerge is executable")
raise f

class SeqSamplePairedNotInterleaved(SeqSample):
Expand All @@ -463,7 +463,7 @@ def _merge_reads(self, threads):
logging.exception("Could not perform read merging with BBmerge. Error from BBmerge was: \n {}".format(p1.stderr.decode('utf-8')))
raise e
except FileNotFoundError as f:
logging.error("BBmerge was not found, make sure BBmerge is executible")
logging.error("BBmerge was not found, make sure BBmerge is executable")
raise f

class SeqSampleNotPaired(SeqSample):
Expand All @@ -478,7 +478,7 @@ def __init__(self, fastq, tempdir):


def _is_paired(fastq, fastq2, single_end):
"""Dertermines workflow based on file inputs.
"""Determines the workflow based on file inputs.
Args:
Expand Down Expand Up @@ -526,7 +526,7 @@ def _check_fastqs(fastq, fastq2=None):
Args:
fastq (str): The path to a fastq or fastq.gz file
fastq2 (str): The path to a fastq or fastq.gz file for the reverese sequences
fastq2 (str): The path to a fastq or fastq.gz file for the reverse sequences
Raises:
SystemExit if invalid input sequences are found.
Expand All @@ -541,7 +541,7 @@ def _check_fastqs(fastq, fastq2=None):
logging.error("There appears to be an issue with your input fastq or fastq.gz file(s).")
raise e
except FileNotFoundError as e:
logging.error("BBtools was not found. check that the BBtools reformat.sh package is executible")
logging.error("BBtools was not found. check that the BBtools reformat.sh package is executable")
raise e


Expand All @@ -557,7 +557,7 @@ def main(args=None):

_logger_setup(args.log)
try:
logging.info("Verifing the input sequecnes.")
logging.info("Verifing the input sequences.")
_check_fastqs(args.fastq, args.fastq2)
# Parse input types
paired_end, interleaved = _is_paired(args.fastq,args.fastq2, args.single_end)
Expand Down

0 comments on commit 1c3f280

Please sign in to comment.