From 5e62c05a10c58fb4fe63a65ac913955d52ea72d9 Mon Sep 17 00:00:00 2001 From: iquasere Date: Tue, 2 Feb 2021 21:35:52 +0000 Subject: [PATCH] Preprocessing now considers "adapter content" module closes #13 --- workflow/envs/meta.yaml | 4 ++-- workflow/mosca.py | 2 +- workflow/scripts/preprocess.py | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/workflow/envs/meta.yaml b/workflow/envs/meta.yaml index 4b86c36..206538d 100644 --- a/workflow/envs/meta.yaml +++ b/workflow/envs/meta.yaml @@ -1,5 +1,5 @@ {% set name = "mosca" %} -{% set version = "1.3.0" %} +{% set version = "1.3.1" %} {% set sha256 = "87cbca039ea9b9c85f417543f2426b2b2acffebe58179878ee6872a32ae949ba" %} package: @@ -40,7 +40,7 @@ requirements: - svn >=1.9.7 - reportlab >=3.5.45 - openpyxl >=3.0.3 - - xlrd >=0.9.0 + - xlrd =1.2 - r-rcolorbrewer >=1.1.2 - pandas >=1.1.4 - scikit-learn >=0.23.1 diff --git a/workflow/mosca.py b/workflow/mosca.py index b19722a..13c0481 100644 --- a/workflow/mosca.py +++ b/workflow/mosca.py @@ -6,7 +6,7 @@ import multiprocessing import sys -__version__ = '1.3.0' +__version__ = '1.3.1' parser = argparse.ArgumentParser(description="MOSCA's main script") parser.add_argument("-s", "--snakefile", type=str, default="{}/Snakefile".format(sys.path[0]), help="Snakefile file") diff --git a/workflow/scripts/preprocess.py b/workflow/scripts/preprocess.py index 40f0d3b..c0fa700 100644 --- a/workflow/scripts/preprocess.py +++ b/workflow/scripts/preprocess.py @@ -58,8 +58,10 @@ def run_fastqc(self, files, out_dir, extract=True, threads='12'): def has_adapters(self, fastqc_report): data = parse_fastqc(fastqc_report) - terms_list = ['Adapter', 'Illumina', - 'Primer'] # Terms that appear in FastQC chapter "overrepresented sequences" + if not data['Adapter Content'][0] == 'pass': + return True + terms_list = [ + 'Adapter', 'Illumina', 'Primer'] # Terms that appear in FastQC chapter "overrepresented sequences" if not data['Overrepresented sequences'][0] == 'pass': i = 0 while i < len(data['Overrepresented sequences'][1]['Possible Source']):