[med-svn] [qcumber] 01/03: Imported Upstream version 1.0.1+dfsg
Andreas Tille
tille at debian.org
Tue Nov 29 16:29:04 UTC 2016
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository qcumber.
commit 52fe08c5dcb9eb9af495c98a6f83fba64d12045f
Author: Andreas Tille <tille at debian.org>
Date: Tue Nov 29 16:34:00 2016 +0100
Imported Upstream version 1.0.1+dfsg
---
QCumber.py | 51 +++++++++++++++++++++++++++------------------------
1 file changed, 27 insertions(+), 24 deletions(-)
diff --git a/QCumber.py b/QCumber.py
index c21b0eb..303edfe 100755
--- a/QCumber.py
+++ b/QCumber.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'LieuV'
-__version__ = "1.0.0"
+__version__ = "1.0.1"
from classes import *
from helper import *
@@ -305,23 +305,21 @@ def main(arguments):
# Case 1: Folder contains fastq files
if len([x for x in input if isfile(x) and any([x.endswith(ext) for ext in file_extensions]) ])>0:
input= [x for x in input if isfile(x) and any([x.endswith(ext) for ext in file_extensions]) ]
- if arguments["technology"].startswith("Illumina"):
- for setname, files in groupby(input, key=lambda x: "_".join(x.split("_")[:-3])):
- #for setname, files in groupby(files, key=lambda x: "_".join(x.split("_")[:-2])):
- temp_file = sorted(list(files))
- r1_reads = [x for x in temp_file if r1_pattern in x]
- r2_reads = [x for x in temp_file if r2_pattern in x]
- myFiles.append([r1_reads, r2_reads])
- else:
- # IonTorrent
- #for setname, files in groupby(input, key=lambda x: "_".join(x.split("_")[:-2])):
- # temp_file = sorted(list(files))
- # TODO Changed
- myFiles = input
- #r1_reads = [x for x in input if r1_pattern in x]
- #r2_reads = [x for x in input if r2_pattern in x]
- #myFiles.append([r1_reads, r2_reads])
-
+ if len(input)!=0:
+ if arguments["technology"].startswith("Illumina"):
+ for setname, files in groupby(input, key=lambda x: "_".join(x.split("_")[:-3])):
+ #for setname, files in groupby(files, key=lambda x: "_".join(x.split("_")[:-2])):
+ temp_file = sorted(list(files))
+ r1_reads = [x for x in temp_file if r1_pattern in x]
+ r2_reads = [x for x in temp_file if r2_pattern in x]
+ if len(r1_reads) != 0:
+ if len(r2_reads) != 0:
+ myFiles.append([r1_reads, r2_reads])
+ else:
+ myFiles.append(r1_reads)
+ else:
+ # IonTorrent
+ myFiles = input
# Case 2: Folder contains subfolder for each sample
else:
input = [x for x in input if os.path.isdir(x)]
@@ -334,7 +332,11 @@ def main(arguments):
temp_file = sorted(list(files))
r1_reads = [x for x in temp_file if r1_pattern in x]
r2_reads = [x for x in temp_file if r2_pattern in x]
- myFiles.append([r1_reads, r2_reads])
+ if len(r1_reads)!=0:
+ if len(r2_reads)!=0:
+ myFiles.append([r1_reads, r2_reads])
+ else:
+ myFiles.append(r1_reads)
else:
myFiles.append(sorted(list(files)))
files = None
@@ -351,6 +353,7 @@ def main(arguments):
myFiles.append([arguments["r1"]])
print("Found " + str(len(myFiles)) + " sample(s).")
+
for subset in myFiles:
print("Analyse " + str(i) + "/" + str(len(myFiles)))
@@ -488,7 +491,7 @@ if __name__ == "__main__":
parser.add_argument('-threads', dest='threads', default = 4, type = int)
parser.add_argument('-adapter', dest = 'adapter', choices = ['TruSeq2-PE', 'TruSeq2-SE' , 'TruSeq3-PE' , 'TruSeq3-SE' , 'TruSeq3-PE-2', 'NexteraPE-PE' ])
parser.add_argument('-reference', dest='reference', required = False, help = "Map reads against reference")
- parser.add_argument('-index', dest='index', required = False, help = "Mapping index")
+ parser.add_argument('-index', dest='index', required = False, help = "Bowtie2 index if available.")
parser.add_argument('-sav', dest='sav', required=False,help="Illumina folder for SAV. Requires RunInfo.xml, RunParamter.xml and Interop folder.")
parser.add_argument('-save_mapping', action = "store_true")
@@ -499,10 +502,10 @@ if __name__ == "__main__":
parser.add_argument('-version', action='version', version='%(prog)s v' + __version__)
parser.add_argument('-nokraken', action = "store_true")
parser.add_argument('-nomapping', action = "store_true")
- parser.add_argument('-trimBetter', action = "store_true")
- parser.add_argument('-trimBetter_threshold', dest='trimBetter_threshold', help = "Default setting for Illumina: 0.15 and for IonTorrent: 0.25.", required=False, type=float)
- parser.add_argument('-forAssembly', action = "store_true", help = "Trim parameter are optimized for assemblies (trim more aggressive).")
- parser.add_argument('-forMapping', action = "store_true", help = "Trim parameter are optimized for mapping (allow more errors).")
+ parser.add_argument('-trimBetter', action = "store_true", help= "Optimize trimming parameter using 'Per sequence base content' from fastqc. Not recommended for amplicons.")
+ parser.add_argument('-trimBetter_threshold', dest='trimBetter_threshold', help = "Set -trimBetter to use this option.Default setting for Illumina: 0.15 and for IonTorrent: 0.25.", required=False, type=float)
+ parser.add_argument('-forAssembly', action = "store_true", help = "Set -trimBetter to use this option.Trim parameter are optimized for assemblies (trim more aggressive).")
+ parser.add_argument('-forMapping', action = "store_true", help = "Set -trimBetter to use this option.Trim parameter are optimized for mapping (allow more errors).")
arguments = vars(parser.parse_args())
main(arguments)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/qcumber.git
More information about the debian-med-commit
mailing list