From bfaf76ce96bed86f6a24c533521804556fbdd646 Mon Sep 17 00:00:00 2001
From: "Gervaise H. Henry" <gervaise.henry@utsouthwestern.edu>
Date: Mon, 3 Aug 2020 14:43:33 -0500
Subject: [PATCH] Move read length num to str to python script

---
 .gitlab-ci.yml                | 1 -
 workflow/rna-seq.nf           | 1 -
 workflow/scripts/parseMeta.py | 2 +-
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 659eadf..fb8278f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -39,7 +39,6 @@ parseMetadata:
   - spike=$(singularity run 'docker://bicf/python3:2.0.1_indev' python3 ./workflow/scripts/parseMeta.py -r Replicate_RID -m "./test_data/meta/metaTest.csv" -p spike)
   - species=$(singularity run 'docker://bicf/python3:2.0.1_indev' python3 ./workflow/scripts/parseMeta.py -r Replicate_RID -m "./test_data/meta/metaTest.csv" -p species)
   - readLength=$(singularity run 'docker://bicf/python3:2.0.1_indev' python3 ./workflow/scripts/parseMeta.py -r Replicate_RID -m "./test_data/meta/metaTest.stageNew.csv" -p readLength)
-  - readLength=""${readLength}
     echo -e "${endsMeta},${endsManual},${stranded},${spike},${species},${readLength},${exp},${study},${rep}" > design.csv
   - pytest -m parseMetadata
 
diff --git a/workflow/rna-seq.nf b/workflow/rna-seq.nf
index 9b77129..1443869 100644
--- a/workflow/rna-seq.nf
+++ b/workflow/rna-seq.nf
@@ -239,7 +239,6 @@ process parseMetadata {
 
     # get read length metadata
     readLength=\$(python3 ${script_parseMeta} -r ${repRID} -m "${experiment}" -p readLength)
-    readLength=""\${readLength}
     echo -e "LOG: read length metadata parsed: \${readLength}" >> ${repRID}.parseMetadata.log
 
     # gave design file
diff --git a/workflow/scripts/parseMeta.py b/workflow/scripts/parseMeta.py
index 6257aec..5000542 100644
--- a/workflow/scripts/parseMeta.py
+++ b/workflow/scripts/parseMeta.py
@@ -105,7 +105,7 @@ def main():
     # Get read length metadata from 'Experiment Settings.csv'
     if (args.parameter == "readLength"):
         readLength = metaFile.Read_Length.unique()
-        print(str(readLength))
+        print(str(readLength).strip('[]'))
 
 if __name__ == '__main__':
     main()
-- 
GitLab