Merge branch 'django1.7' of mus.cacr.caltech.edu:htsworkflow into django1.7
authorDiane Trout <diane@ghic.org>
Tue, 20 Oct 2015 23:17:47 +0000 (16:17 -0700)
committerDiane Trout <diane@ghic.org>
Tue, 20 Oct 2015 23:17:47 +0000 (16:17 -0700)
htsworkflow/submission/aws_submission.py
htsworkflow/submission/encoded.py
htsworkflow/templates/aws_metadata.sparql

index 06dbd601b0a1b6e52c7b5cec4a5109671755fd31..0b76b04d42d53e4b859bbde2004de66a90454825 100644 (file)
@@ -86,6 +86,8 @@ class AWSSubmission(Submission):
         for row in results:
             if 'platform' in row:
                 row['platform'] = platform_alias[row['platform']]
+            if 'read_length' in row:
+                row['read_length'] = int(row['read_length'])
             flowcell_details = {}
             for term in ['machine', 'flowcell', 'lane', 'barcode']:
                 if term in row:
index 964cdb69a7454aeaf9f02dbe6b5e3bbf3bcd9488..c8ed19511b8dd55a03ef5c5e30da6983920aa5fd 100644 (file)
@@ -11,6 +11,7 @@ import logging
 import json
 import jsonschema
 import os
+import re
 import requests
 import six
 from six.moves.urllib.parse import urljoin, urlparse, urlunparse
@@ -474,7 +475,7 @@ class TypedColumnParser(object):
     def parse_sheet_array_type(value):
         """Helper function to parse :array columns in sheet
         """
-        return value.split(', ')
+        return re.split(',\s*', value)
 
     @staticmethod
     def parse_sheet_integer_type(value):
index fd99df8e2097b011313756a0139abd9780e084d4..dc2ae329c227ff0f82dfb8062c1f2f213fe7c066 100644 (file)
@@ -6,7 +6,7 @@ PREFIX ncbiTaxon: <http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=>
 PREFIX geoSoft: <http://www.ncbi.nlm.nih.gov/geo/info/soft2.html#>
 PREFIX cells: <http://encodewiki.ucsc.edu/EncodeDCC/index.php/Cell_lines#>
 
-select distinct ?dataset ?replicate ?award ?lab ?lane ?barcode ?submitted_file_name ?file_format ?file_size ?output_type ?md5sum ?flowcell ?machine ?platform
+select distinct ?dataset ?replicate ?award ?lab ?lane ?read_length ?barcode ?submitted_file_name ?file_format ?file_size ?output_type ?md5sum ?flowcell ?machine ?platform
 WHERE {
   <{{submission}}> a submissionOntology:submission ;
                    encode3:dataset ?dataset ;
@@ -23,6 +23,7 @@ WHERE {
         htswlib:library ?library ;
         htswlib:flowcell ?flowcell_url ;
         htswlib:lane_number ?lane ;
+        htswlib:read_length ?read_length ;
         a ?fileClass .
 
   ?flowcell_url htswlib:sequenced_by ?machine ;