From dfed27c23d44f50ec883d42fe450f9b1a8280f19 Mon Sep 17 00:00:00 2001
From: Venkat Malladi <venkat.malladi@utsouthwestern.edu>
Date: Wed, 20 Sep 2017 14:09:12 -0500
Subject: [PATCH] update syntax and order of qc_fastq.py

---
 workflow/scripts/qc_fastq.py | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/workflow/scripts/qc_fastq.py b/workflow/scripts/qc_fastq.py
index f58cb9f..991d927 100755
--- a/workflow/scripts/qc_fastq.py
+++ b/workflow/scripts/qc_fastq.py
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# -*- coding: latin-1 -*-
+
 '''QC check of raw .fastq files using FASTQC.'''
 
 import os
@@ -23,19 +23,6 @@ LOGGER.propagate = False
 LOGGER.setLevel(logging.INFO)
 
 
-def check_tools():
-    '''Checks for required componenets on user system'''
-
-    LOGGER.info('Checking for required libraries and components on this system')
-
-    fastqc_path = shutil.which("fastqc")
-    if fastqc_path:
-        LOGGER.info('Found fastqc: %s', fastqc_path)
-    else:
-        print("Please install 'fastqc' before using the tool")
-        sys.exit()
-
-
 def get_args():
     '''Define arguments.'''
     parser = argparse.ArgumentParser(
@@ -51,6 +38,19 @@ def get_args():
     return args
 
 
+def check_tools():
+    '''Checks for required componenets on user system'''
+
+    LOGGER.info('Checking for required libraries and components on this system')
+
+    fastqc_path = shutil.which("fastqc")
+    if fastqc_path:
+        LOGGER.info('Found fastqc: %s', fastqc_path)
+    else:
+        print("Please install 'fastqc' before using the tool")
+        sys.exit()
+
+
 def check_qual_fastq(fastq):
     '''Run fastqc on 1 or 2 files.'''
     qc_command = "fastqc -t -f fastq " + " ".join(fastq)
-- 
GitLab