Skip to content
Snippets Groups Projects
Commit 7ec07b61 authored by Gervaise Henry's avatar Gervaise Henry 🤠
Browse files

Update workflow/main.nf, workflow/scripts/check_design.py,...

Update workflow/main.nf, workflow/scripts/check_design.py, workflow/scripts/generate_references.py, workflow/scripts/generate_versions.py, workflow/scripts/filename_check.sh, workflow/tests/test_check_design.py, workflow/tests/test_count.py, workflow/tests/test_multiqc.py, workflow/tests/test_versions.py files
parent 8acb2e82
1 merge request!57Develop
Pipeline #4725 passed with stages
in 49 minutes and 57 seconds
#!/usr/bin/env nextflow
// Path to an input file, or a pattern for multiple inputs
// Note - $baseDir is the location of this workflow file main.nf
/*
main.nf
*
* --------------------------------------------------------------------------
* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
* --------------------------------------------------------------------------
*
*/
// Define Input variables
params.name = "run"
......@@ -64,6 +69,7 @@ outDir = params.outDir
multiqcConf = params.multiqcConf
references = params.references
process checkDesignFile {
tag "${name}"
......@@ -324,7 +330,6 @@ process versions {
metricsSummary = metricsSummary211.mix(metricsSummary301, metricsSummary302, metricsSummary310)
// Generate MultiQC Report
process multiqc {
tag "${name}"
......@@ -348,4 +353,4 @@ process multiqc {
multiqc -c ${multiqcConf} .
"""
}
}
\ No newline at end of file
#!/usr/bin/env python3
'''Check if design file is correctly formatted and matches files list.'''
#check_design.py
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
import argparse
import logging
......@@ -11,8 +15,6 @@ For more details:
%(prog)s --help
'''
# SETTINGS
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
logger.propagate = False
......@@ -61,6 +63,7 @@ def check_design_headers(design):
return design
def check_files(design, fastq):
'''Check if design file has the files found.'''
......@@ -104,4 +107,4 @@ def main():
new_design_df.to_csv('design.checked.csv', header=True, sep=',', index=False)
if __name__ == '__main__':
main()
main()
\ No newline at end of file
#!/bin/bash
#filename_check.sh
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
usage() {
echo "-r --ref file"
......@@ -28,4 +33,4 @@ if [ $(echo "${ref}" | tr -d ' ') != "${ref}" ]; then
echo "Error: Spaces found in Reference Files"
echo ${ref}
exit 21
fi
fi
\ No newline at end of file
#!/usr/bin/env python3
'''Make header for HTML of references.'''
#generate_references.py
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
import argparse
import subprocess
......@@ -12,8 +16,6 @@ For more details:
%(prog)s --help
'''
# SETTINGS
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
logger.propagate = False
......@@ -65,4 +67,4 @@ def main():
if __name__ == '__main__':
main()
main()
\ No newline at end of file
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''Make YAML of software versions.'''
#generate_versions.py
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
from __future__ import print_function
from collections import OrderedDict
......@@ -15,7 +18,6 @@ For more details:
%(prog)s --help
'''
# SETTINGS
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
logger.propagate = False
......@@ -104,4 +106,4 @@ def main():
if __name__ == '__main__':
main()
main()
\ No newline at end of file
#!/usr/bin/env python3
#test_check_design.py
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
import pytest
import pandas as pd
......@@ -22,4 +28,4 @@ def test_count302_design():
@pytest.mark.count310
def test_count310_design():
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
assert os.path.exists(os.path.join(test_output_path, 'design.checked.csv'))
\ No newline at end of file
#!/usr/bin/env python3
#test_count.py
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
import pytest
import pandas as pd
......@@ -27,4 +33,4 @@ def test_count302_count():
@pytest.mark.count310
def test_count310_count():
assert os.path.exists(os.path.join(test_output_path, 'count310', 'sample1_metrics_summary.tsv'))
assert os.path.exists(os.path.join(test_output_path, 'count310', 'sample1', 'outs'))
assert os.path.exists(os.path.join(test_output_path, 'count310', 'sample1', 'outs'))
\ No newline at end of file
#!/usr/bin/env python3
#test_multiqc.py
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
import pytest
import pandas as pd
......@@ -22,4 +28,4 @@ def test_count302_multiqc():
@pytest.mark.count310
def test_count310_multiqc():
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
assert os.path.exists(os.path.join(test_output_path, 'multiqc_report.html'))
\ No newline at end of file
#!/usr/bin/env python3
#test_versions.py
#*
#* --------------------------------------------------------------------------
#* Licensed under MIT (https://git.biohpc.swmed.edu/BICF/Astrocyte/cellranger_count/blob/develop/LICENSE)
#* --------------------------------------------------------------------------
#*
import pytest
import pandas as pd
......@@ -26,4 +32,4 @@ def test_count302_versions():
@pytest.mark.count310
def test_count310_versions():
assert os.path.exists(os.path.join(test_output_path, 'versions_mqc.yaml'))
assert os.path.exists(os.path.join(test_output_path, 'references_mqc.yaml'))
assert os.path.exists(os.path.join(test_output_path, 'references_mqc.yaml'))
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment