From 7ec07b61451d84b96a8713cd78537326babc17f6 Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Wed, 14 Aug 2019 21:19:38 -0500
Subject: [PATCH] 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

---
 workflow/main.nf                        | 15 ++++++++++-----
 workflow/scripts/check_design.py        | 13 ++++++++-----
 workflow/scripts/filename_check.sh      |  7 ++++++-
 workflow/scripts/generate_references.py | 12 +++++++-----
 workflow/scripts/generate_versions.py   | 12 +++++++-----
 workflow/tests/test_check_design.py     |  8 +++++++-
 workflow/tests/test_count.py            |  8 +++++++-
 workflow/tests/test_multiqc.py          |  8 +++++++-
 workflow/tests/test_versions.py         |  8 +++++++-
 9 files changed, 66 insertions(+), 25 deletions(-)

diff --git a/workflow/main.nf b/workflow/main.nf
index 4a7edee..8862991 100755
--- a/workflow/main.nf
+++ b/workflow/main.nf
@@ -1,7 +1,12 @@
 #!/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
diff --git a/workflow/scripts/check_design.py b/workflow/scripts/check_design.py
index a648a4e..c5c679e 100755
--- a/workflow/scripts/check_design.py
+++ b/workflow/scripts/check_design.py
@@ -1,6 +1,10 @@
 #!/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
diff --git a/workflow/scripts/filename_check.sh b/workflow/scripts/filename_check.sh
index 78fa08e..333bb7a 100644
--- a/workflow/scripts/filename_check.sh
+++ b/workflow/scripts/filename_check.sh
@@ -1,5 +1,10 @@
 #!/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
diff --git a/workflow/scripts/generate_references.py b/workflow/scripts/generate_references.py
index c40cc7e..e614db7 100755
--- a/workflow/scripts/generate_references.py
+++ b/workflow/scripts/generate_references.py
@@ -1,6 +1,10 @@
 #!/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
diff --git a/workflow/scripts/generate_versions.py b/workflow/scripts/generate_versions.py
index 242c971..ddcda53 100755
--- a/workflow/scripts/generate_versions.py
+++ b/workflow/scripts/generate_versions.py
@@ -1,7 +1,10 @@
 #!/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
diff --git a/workflow/tests/test_check_design.py b/workflow/tests/test_check_design.py
index c22850c..f425d09 100644
--- a/workflow/tests/test_check_design.py
+++ b/workflow/tests/test_check_design.py
@@ -1,4 +1,10 @@
 #!/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
diff --git a/workflow/tests/test_count.py b/workflow/tests/test_count.py
index 3144d1e..86623ca 100644
--- a/workflow/tests/test_count.py
+++ b/workflow/tests/test_count.py
@@ -1,4 +1,10 @@
 #!/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
diff --git a/workflow/tests/test_multiqc.py b/workflow/tests/test_multiqc.py
index 041ad23..7ca8d23 100644
--- a/workflow/tests/test_multiqc.py
+++ b/workflow/tests/test_multiqc.py
@@ -1,4 +1,10 @@
 #!/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
diff --git a/workflow/tests/test_versions.py b/workflow/tests/test_versions.py
index b299fb9..535e029 100644
--- a/workflow/tests/test_versions.py
+++ b/workflow/tests/test_versions.py
@@ -1,4 +1,10 @@
 #!/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
-- 
GitLab