mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-24 06:09:54 +00:00
Fix final linting problems for template merge
This commit is contained in:
parent
8fff741f85
commit
e64b3f85a4
2 changed files with 142 additions and 110 deletions
|
@ -6,10 +6,9 @@ import sys
|
||||||
import errno
|
import errno
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def parse_args(args=None):
|
def parse_args(args=None):
|
||||||
Description = (
|
Description = "Reformat nf-core/taxprofiler samplesheet file and check its contents."
|
||||||
"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>"
|
||||||
|
|
||||||
|
@ -18,6 +17,7 @@ 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,6 +26,7 @@ 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 != "":
|
||||||
|
@ -35,6 +36,7 @@ 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:
|
||||||
|
@ -118,9 +120,7 @@ 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(
|
"Invalid number of populated columns (minimum = {})!".format(MIN_COLS),
|
||||||
MIN_COLS
|
|
||||||
),
|
|
||||||
"Line",
|
"Line",
|
||||||
line,
|
line,
|
||||||
)
|
)
|
||||||
|
@ -183,13 +183,9 @@ 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 (
|
elif sample and fastq_1 and not fastq_2: ## Single-end short/long fastq reads
|
||||||
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 (
|
elif sample and fasta and not fastq_1 and not fastq_2: ## Single-end long reads
|
||||||
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(
|
||||||
|
|
36
modules.json
36
modules.json
|
@ -3,105 +3,141 @@
|
||||||
"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",
|
||||||
|
"modules": {
|
||||||
"adapterremoval": {
|
"adapterremoval": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "879d42c5e28661fe0a5e744c9e2c515868f9e08a"
|
"git_sha": "879d42c5e28661fe0a5e744c9e2c515868f9e08a"
|
||||||
},
|
},
|
||||||
"bbmap/bbduk": {
|
"bbmap/bbduk": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"bowtie2/align": {
|
"bowtie2/align": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"bowtie2/build": {
|
"bowtie2/build": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"cat/fastq": {
|
"cat/fastq": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"centrifuge/centrifuge": {
|
"centrifuge/centrifuge": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "d2726fcf75063960f06b36d2229a4c0966614108"
|
"git_sha": "d2726fcf75063960f06b36d2229a4c0966614108"
|
||||||
},
|
},
|
||||||
"centrifuge/kreport": {
|
"centrifuge/kreport": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838"
|
"git_sha": "734d0db6079a4aa43b6509b207e5d6feb35d4838"
|
||||||
},
|
},
|
||||||
"custom/dumpsoftwareversions": {
|
"custom/dumpsoftwareversions": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"diamond/blastx": {
|
"diamond/blastx": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa"
|
"git_sha": "3531824af826c16cd252bc5aa82ae169b244ebaa"
|
||||||
},
|
},
|
||||||
"fastp": {
|
"fastp": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789"
|
"git_sha": "d0a1cbb703a130c19f6796c3fce24fbe7dfce789"
|
||||||
},
|
},
|
||||||
"fastqc": {
|
"fastqc": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"filtlong": {
|
"filtlong": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "957cb9b83668075f4af101fc99502908cca487e3"
|
"git_sha": "957cb9b83668075f4af101fc99502908cca487e3"
|
||||||
},
|
},
|
||||||
"gunzip": {
|
"gunzip": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9"
|
"git_sha": "9aadd9a6d3f5964476582319b3a1c54a3e3fe7c9"
|
||||||
},
|
},
|
||||||
"kaiju/kaiju": {
|
"kaiju/kaiju": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "8856f127c58f6af479128be8b8df4d42e442ddbe"
|
"git_sha": "8856f127c58f6af479128be8b8df4d42e442ddbe"
|
||||||
},
|
},
|
||||||
"kaiju/kaiju2krona": {
|
"kaiju/kaiju2krona": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "2f0b19240430de6807b1232e6d9d0e8084e8a28f"
|
"git_sha": "2f0b19240430de6807b1232e6d9d0e8084e8a28f"
|
||||||
},
|
},
|
||||||
"kaiju/kaiju2table": {
|
"kaiju/kaiju2table": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "538dbac98ba9c8f799536cd5a617195501439457"
|
"git_sha": "538dbac98ba9c8f799536cd5a617195501439457"
|
||||||
},
|
},
|
||||||
"kraken2/kraken2": {
|
"kraken2/kraken2": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "abe025677cdd805cc93032341ab19885473c1a07"
|
"git_sha": "abe025677cdd805cc93032341ab19885473c1a07"
|
||||||
},
|
},
|
||||||
"krakentools/kreport2krona": {
|
"krakentools/kreport2krona": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422"
|
"git_sha": "8b2a473f586bed003e72d2b183acc43fc0ddc422"
|
||||||
},
|
},
|
||||||
"krona/ktimporttaxonomy": {
|
"krona/ktimporttaxonomy": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e"
|
"git_sha": "0e9fd9370ad1845870b8a9c63fcc47d999a1739e"
|
||||||
},
|
},
|
||||||
"krona/ktimporttext": {
|
"krona/ktimporttext": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2"
|
"git_sha": "cdefbec66999c0b49d8bfeea9d6f9d19056635a2"
|
||||||
},
|
},
|
||||||
"malt/run": {
|
"malt/run": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "be8d7b3293cac26cc63e4dbfb364deb8ed6ec7e5"
|
"git_sha": "be8d7b3293cac26cc63e4dbfb364deb8ed6ec7e5"
|
||||||
},
|
},
|
||||||
"megan/rma2info": {
|
"megan/rma2info": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "2d38566eca4cc15142b2ffa7c11837569b39aece"
|
"git_sha": "2d38566eca4cc15142b2ffa7c11837569b39aece"
|
||||||
},
|
},
|
||||||
"metaphlan3": {
|
"metaphlan3": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "ed4dd1a928ebf4308efb720de878045f7773f8e2"
|
"git_sha": "ed4dd1a928ebf4308efb720de878045f7773f8e2"
|
||||||
},
|
},
|
||||||
"minimap2/align": {
|
"minimap2/align": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b"
|
"git_sha": "1a5a9e7b4009dcf34e6867dd1a5a1d9a718b027b"
|
||||||
},
|
},
|
||||||
"minimap2/index": {
|
"minimap2/index": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"motus/merge": {
|
"motus/merge": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49"
|
"git_sha": "b02e648c221e1da17cb589eefe297e61ec9e9c49"
|
||||||
},
|
},
|
||||||
"motus/profile": {
|
"motus/profile": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18"
|
"git_sha": "b6ed584443ad68ac41e6975994139454a4f23c18"
|
||||||
},
|
},
|
||||||
"multiqc": {
|
"multiqc": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
"git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d"
|
||||||
},
|
},
|
||||||
"porechop": {
|
"porechop": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "b78e19b9dae3671db2c7d4346fe04452c1debfab"
|
"git_sha": "b78e19b9dae3671db2c7d4346fe04452c1debfab"
|
||||||
},
|
},
|
||||||
"prinseqplusplus": {
|
"prinseqplusplus": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "f1c5384c31e985591716afdd732cf8c2ae29d05b"
|
"git_sha": "f1c5384c31e985591716afdd732cf8c2ae29d05b"
|
||||||
},
|
},
|
||||||
"samtools/bam2fq": {
|
"samtools/bam2fq": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159"
|
"git_sha": "5510ea39fe638594bc26ac34cadf4a84bf27d159"
|
||||||
},
|
},
|
||||||
"samtools/view": {
|
"samtools/view": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce"
|
"git_sha": "6b64f9cb6c3dd3577931cc3cd032d6fb730000ce"
|
||||||
},
|
},
|
||||||
"untar": {
|
"untar": {
|
||||||
|
"branch": "master",
|
||||||
"git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918"
|
"git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue