mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 02:06:08 +00:00
Revert "Fix final linting problems for template merge"
This reverts commit e64b3f85a4
.
This commit is contained in:
parent
61560cf065
commit
8fe7f8bf4b
2 changed files with 110 additions and 142 deletions
|
@ -6,9 +6,10 @@ import sys
|
||||||
import errno
|
import errno
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def parse_args(args=None):
|
def parse_args(args=None):
|
||||||
Description = "Reformat nf-core/taxprofiler samplesheet file and check its contents."
|
Description = (
|
||||||
|
"Reformat nf-core/taxprofiler samplesheet file and check its contents."
|
||||||
|
)
|
||||||
|
|
||||||
Epilog = "Example usage: python check_samplesheet.py <FILE_IN> <FILE_OUT>"
|
Epilog = "Example usage: python check_samplesheet.py <FILE_IN> <FILE_OUT>"
|
||||||
|
|
||||||
|
@ -17,7 +18,6 @@ def parse_args(args=None):
|
||||||
parser.add_argument("FILE_OUT", help="Output file.")
|
parser.add_argument("FILE_OUT", help="Output file.")
|
||||||
return parser.parse_args(args)
|
return parser.parse_args(args)
|
||||||
|
|
||||||
|
|
||||||
def make_dir(path):
|
def make_dir(path):
|
||||||
if len(path) > 0:
|
if len(path) > 0:
|
||||||
try:
|
try:
|
||||||
|
@ -26,7 +26,6 @@ def make_dir(path):
|
||||||
if exception.errno != errno.EEXIST:
|
if exception.errno != errno.EEXIST:
|
||||||
raise exception
|
raise exception
|
||||||
|
|
||||||
|
|
||||||
def print_error(error, context="Line", context_str=""):
|
def print_error(error, context="Line", context_str=""):
|
||||||
error_str = "ERROR: Please check samplesheet -> {}".format(error)
|
error_str = "ERROR: Please check samplesheet -> {}".format(error)
|
||||||
if context != "" and context_str != "":
|
if context != "" and context_str != "":
|
||||||
|
@ -36,7 +35,6 @@ def print_error(error, context="Line", context_str=""):
|
||||||
print(error_str)
|
print(error_str)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def check_samplesheet(file_in, file_out):
|
def check_samplesheet(file_in, file_out):
|
||||||
"""
|
"""
|
||||||
This function checks that the samplesheet follows the following structure:
|
This function checks that the samplesheet follows the following structure:
|
||||||
|
@ -120,7 +118,9 @@ def check_samplesheet(file_in, file_out):
|
||||||
num_cols = len([x for x in lspl if x])
|
num_cols = len([x for x in lspl if x])
|
||||||
if num_cols < MIN_COLS:
|
if num_cols < MIN_COLS:
|
||||||
print_error(
|
print_error(
|
||||||
"Invalid number of populated columns (minimum = {})!".format(MIN_COLS),
|
"Invalid number of populated columns (minimum = {})!".format(
|
||||||
|
MIN_COLS
|
||||||
|
),
|
||||||
"Line",
|
"Line",
|
||||||
line,
|
line,
|
||||||
)
|
)
|
||||||
|
@ -183,9 +183,13 @@ def check_samplesheet(file_in, file_out):
|
||||||
## Auto-detect paired-end/single-end
|
## Auto-detect paired-end/single-end
|
||||||
if sample and fastq_1 and fastq_2: ## Paired-end short reads
|
if sample and fastq_1 and fastq_2: ## Paired-end short reads
|
||||||
sample_info.extend(["0", fastq_1, fastq_2, fasta])
|
sample_info.extend(["0", fastq_1, fastq_2, fasta])
|
||||||
elif sample and fastq_1 and not fastq_2: ## Single-end short/long fastq reads
|
elif (
|
||||||
|
sample and fastq_1 and not fastq_2
|
||||||
|
): ## Single-end short/long fastq reads
|
||||||
sample_info.extend(["1", fastq_1, fastq_2, fasta])
|
sample_info.extend(["1", fastq_1, fastq_2, fasta])
|
||||||
elif sample and fasta and not fastq_1 and not fastq_2: ## Single-end long reads
|
elif (
|
||||||
|
sample and fasta and not fastq_1 and not fastq_2
|
||||||
|
): ## Single-end long reads
|
||||||
sample_info.extend(["1", fastq_1, fastq_2, fasta])
|
sample_info.extend(["1", fastq_1, fastq_2, fasta])
|
||||||
elif fasta and (fastq_1 or fastq_2):
|
elif fasta and (fastq_1 or fastq_2):
|
||||||
print_error(
|
print_error(
|
||||||
|
|
232
modules.json
232
modules.json
|
@ -3,140 +3,104 @@
|
||||||
"homePage": "https://github.com/nf-core/taxprofiler",
|
"homePage": "https://github.com/nf-core/taxprofiler",
|
||||||
"repos": {
|
"repos": {
|
||||||
"nf-core/modules": {
|
"nf-core/modules": {
|
||||||
"git_url": "https://github.com/nf-core/modules.git",
|
"adapterremoval": {
|
||||||
"modules": {
|
"git_sha": "879d42c5e28661fe0a5e744c9e2c515868f9e08a"
|
||||||
"adapterremoval": {
|
},
|
||||||
"branch": "master",
|
"bbmap/bbduk": {
|
||||||
"git_sha": "879d42c5e28661fe0a5e744c9e2c515868f9e08a"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"bbmap/bbduk": {
|
"bowtie2/align": {
|
||||||
"branch": "master",
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
},
|
||||||
},
|
"bowtie2/build": {
|
||||||
"bowtie2/align": {
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
"branch": "master",
|
},
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"cat/fastq": {
|
||||||
},
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
"bowtie2/build": {
|
},
|
||||||
"branch": "master",
|
"centrifuge/centrifuge": {
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "d2726fcf75063960f06b36d2229a4c0966614108"
|
||||||
},
|
},
|
||||||
"cat/fastq": {
|
"centrifuge/kreport": {
|
||||||
"branch": "master",
|
"git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838"
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
},
|
||||||
},
|
"custom/dumpsoftwareversions": {
|
||||||
"centrifuge/centrifuge": {
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
"branch": "master",
|
},
|
||||||
"git_sha": "d2726fcf75063960f06b36d2229a4c0966614108"
|
"diamond/blastx": {
|
||||||
},
|
"git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa"
|
||||||
"centrifuge/kreport": {
|
},
|
||||||
"branch": "master",
|
"fastp": {
|
||||||
"git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838"
|
"git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789"
|
||||||
},
|
},
|
||||||
"custom/dumpsoftwareversions": {
|
"fastqc": {
|
||||||
"branch": "master",
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
},
|
||||||
},
|
"filtlong": {
|
||||||
"diamond/blastx": {
|
"git_sha": "957cb9b83668075f4af101fc99502908cca487e3"
|
||||||
"branch": "master",
|
},
|
||||||
"git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa"
|
"gunzip": {
|
||||||
},
|
"git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9"
|
||||||
"fastp": {
|
},
|
||||||
"branch": "master",
|
"kaiju/kaiju": {
|
||||||
"git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789"
|
"git_sha": "8856f127c58f6af479128be8b8df4d42e442ddbe"
|
||||||
},
|
},
|
||||||
"fastqc": {
|
"kaiju/kaiju2krona": {
|
||||||
"branch": "master",
|
"git_sha": "2f0b19240430de6807b1232e6d9d0e8084e8a28f"
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
},
|
||||||
},
|
"kaiju/kaiju2table": {
|
||||||
"filtlong": {
|
"git_sha": "538dbac98ba9c8f799536cd5a617195501439457"
|
||||||
"branch": "master",
|
},
|
||||||
"git_sha": "957cb9b83668075f4af101fc99502908cca487e3"
|
"kraken2/kraken2": {
|
||||||
},
|
"git_sha": "abe025677cdd805cc93032341ab19885473c1a07"
|
||||||
"gunzip": {
|
},
|
||||||
"branch": "master",
|
"krakentools/kreport2krona": {
|
||||||
"git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9"
|
"git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422"
|
||||||
},
|
},
|
||||||
"kaiju/kaiju": {
|
"krona/ktimporttaxonomy": {
|
||||||
"branch": "master",
|
"git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e"
|
||||||
"git_sha": "8856f127c58f6af479128be8b8df4d42e442ddbe"
|
},
|
||||||
},
|
"krona/ktimporttext": {
|
||||||
"kaiju/kaiju2krona": {
|
"git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2"
|
||||||
"branch": "master",
|
},
|
||||||
"git_sha": "2f0b19240430de6807b1232e6d9d0e8084e8a28f"
|
"malt/run": {
|
||||||
},
|
"git_sha": "be8d7b3293cac26cc63e4dbfb364deb8ed6ec7e5"
|
||||||
"kaiju/kaiju2table": {
|
},
|
||||||
"branch": "master",
|
"megan/rma2info": {
|
||||||
"git_sha": "538dbac98ba9c8f799536cd5a617195501439457"
|
"git_sha": "2d38566eca4cc15142b2ffa7c11837569b39aece"
|
||||||
},
|
},
|
||||||
"kraken2/kraken2": {
|
"metaphlan3": {
|
||||||
"branch": "master",
|
"git_sha": "ed4dd1a928ebf4308efb720de878045f7773f8e2"
|
||||||
"git_sha": "abe025677cdd805cc93032341ab19885473c1a07"
|
},
|
||||||
},
|
"minimap2/align": {
|
||||||
"krakentools/kreport2krona": {
|
"git_sha": "1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b"
|
||||||
"branch": "master",
|
},
|
||||||
"git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422"
|
"minimap2/index": {
|
||||||
},
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
"krona/ktimporttaxonomy": {
|
},
|
||||||
"branch": "master",
|
"motus/merge": {
|
||||||
"git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e"
|
"git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49"
|
||||||
},
|
},
|
||||||
"krona/ktimporttext": {
|
"motus/profile": {
|
||||||
"branch": "master",
|
"git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18"
|
||||||
"git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2"
|
},
|
||||||
},
|
"multiqc": {
|
||||||
"malt/run": {
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
"branch": "master",
|
},
|
||||||
"git_sha": "be8d7b3293cac26cc63e4dbfb364deb8ed6ec7e5"
|
"porechop": {
|
||||||
},
|
"git_sha": "b78e19b9dae3671db2c7d4346fe04452c1debfab"
|
||||||
"megan/rma2info": {
|
},
|
||||||
"branch": "master",
|
"prinseqplusplus": {
|
||||||
"git_sha": "2d38566eca4cc15142b2ffa7c11837569b39aece"
|
"git_sha": "f1c5384c31e985591716afdd732cf8c2ae29d05b"
|
||||||
},
|
},
|
||||||
"metaphlan3": {
|
"samtools/bam2fq": {
|
||||||
"branch": "master",
|
"git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159"
|
||||||
"git_sha": "ed4dd1a928ebf4308efb720de878045f7773f8e2"
|
},
|
||||||
},
|
"samtools/view": {
|
||||||
"minimap2/align": {
|
"git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce"
|
||||||
"branch": "master",
|
},
|
||||||
"git_sha": "1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b"
|
"untar": {
|
||||||
},
|
"git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918"
|
||||||
"minimap2/index": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
|
||||||
},
|
|
||||||
"motus/merge": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49"
|
|
||||||
},
|
|
||||||
"motus/profile": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18"
|
|
||||||
},
|
|
||||||
"multiqc": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
|
||||||
},
|
|
||||||
"porechop": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "b78e19b9dae3671db2c7d4346fe04452c1debfab"
|
|
||||||
},
|
|
||||||
"prinseqplusplus": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "f1c5384c31e985591716afdd732cf8c2ae29d05b"
|
|
||||||
},
|
|
||||||
"samtools/bam2fq": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159"
|
|
||||||
},
|
|
||||||
"samtools/view": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce"
|
|
||||||
},
|
|
||||||
"untar": {
|
|
||||||
"branch": "master",
|
|
||||||
"git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue