From: Diane Trout Date: Thu, 30 Jun 2011 22:48:57 +0000 (-0700) Subject: Merge branch 'master' of mus.cacr.caltech.edu:htsworkflow X-Git-Tag: 0.5.2~5^2~1 X-Git-Url: http://woldlab.caltech.edu/gitweb/?a=commitdiff_plain;h=b7afc206f8490217ca920515674bcedc8aae184c;hp=cb31e85879d6be5b9ddbc843c5b4390080bfb61b;p=htsworkflow.git Merge branch 'master' of mus.cacr.caltech.edu:htsworkflow --- diff --git a/extra/ucsc_encode_submission/ucsc_gather.py b/extra/ucsc_encode_submission/ucsc_gather.py index d52b11b..37169c0 100755 --- a/extra/ucsc_encode_submission/ucsc_gather.py +++ b/extra/ucsc_encode_submission/ucsc_gather.py @@ -210,15 +210,15 @@ def make_ddf(view_map, submissionNode, daf_name, make_condor=False, outdir=None) PREFIX submissionOntology: PREFIX ucscDaf: -select ?submitView ?filename ?md5sum ?view ?cell ?antibody ?sex ?control ?controlId ?labExpId ?labVersion ?treatment ?protocol +select ?submitView ?files ?md5sum ?view ?cell ?antibody ?sex ?control ?controlId ?labExpId ?labVersion ?treatment ?protocol WHERE { - ?file ucscDaf:filename ?filename ; + ?file ucscDaf:filename ?files ; ucscDaf:md5sum ?md5sum . ?submitView ucscDaf:has_file ?file ; ucscDaf:view ?dafView ; - ucscDaf:submission %(submission)s . + ucscDaf:submission <%(submission)s> . ?dafView ucscDaf:name ?view . - %(submission)s submissionOntology:library ?library . + <%(submission)s> submissionOntology:library ?library . OPTIONAL { ?submitView ucscDaf:antibody ?antibody } OPTIONAL { ?submitView ucscDaf:cell ?cell } @@ -245,12 +245,12 @@ ORDER BY ?submitView""" else: output = sys.stdout - formatted_query = query_template % {'submission': str(submissionNode)} + formatted_query = query_template % {'submission': str(submissionNode.uri)} query = RDF.SPARQLQuery(formatted_query) results = query.execute(view_map.model) - variables = ['filename'] + variables = ['files'] # filename goes first variables.extend(view_map.get_daf_variables()) variables += ['controlId', 'labExpId', 'md5sum'] @@ -264,7 +264,7 @@ ORDER BY ?submitView""" current = all_views.setdefault(viewname, {}) for variable_name in variables: value = str(fromTypedNode(row[variable_name])) - if variable_name in ('filename', 'md5sum'): + if variable_name in ('files', 'md5sum'): current.setdefault(variable_name,[]).append(value) else: current[variable_name] = value @@ -272,13 +272,13 @@ ORDER BY ?submitView""" for view in all_views.keys(): line = [] for variable_name in variables: - if variable_name in ('filename', 'md5sum'): + if variable_name in ('files', 'md5sum'): line.append(','.join(all_views[view][variable_name])) else: line.append(all_views[view][variable_name]) output.write("\t".join(line)) output.write(os.linesep) - all_files.extend(all_views[view]['filename']) + all_files.extend(all_views[view]['files']) logging.info( "Examined {0}, found files: {1}".format( diff --git a/htsworkflow/frontend/experiments/models.py b/htsworkflow/frontend/experiments/models.py index 3e8cc86..36f6abd 100755 --- a/htsworkflow/frontend/experiments/models.py +++ b/htsworkflow/frontend/experiments/models.py @@ -180,7 +180,7 @@ def is_valid_lane(value): class Lane(models.Model): flowcell = models.ForeignKey(FlowCell) - lane_number = models.IntegerField(validators=[is_valid_lane]) + lane_number = models.IntegerField() library = models.ForeignKey(Library) pM = models.DecimalField(max_digits=5, decimal_places=2,blank=False, null=False,default=default_pM) cluster_estimate = models.IntegerField(blank=True, null=True) @@ -193,8 +193,8 @@ class Lane(models.Model): [str(self.id)]) def __unicode__(self): - return self.flowcell.flowcell_id + ':' + unicode(self.lane_number) - + return self.flowcell.flowcell_id + ':' + unicode(self.lane_number) + ### ----------------------- class DataRun(models.Model): flowcell = models.ForeignKey(FlowCell,verbose_name="Flowcell Id") diff --git a/htsworkflow/frontend/templates/sample_header.html b/htsworkflow/frontend/templates/sample_header.html index 8ef06a8..f51e649 100644 --- a/htsworkflow/frontend/templates/sample_header.html +++ b/htsworkflow/frontend/templates/sample_header.html @@ -25,7 +25,7 @@ {% if lib.antibody %} Antibody: {{ lib.antibody.antibodies }} - {% if lib.antibody.antibodies.nuckname %} + {% if lib.antibody.antibodies.nickname %} ({{ lib.antibody.nickname }}) {% endif %}
diff --git a/htsworkflow/submission/daf.py b/htsworkflow/submission/daf.py index 28f7599..75c8868 100644 --- a/htsworkflow/submission/daf.py +++ b/htsworkflow/submission/daf.py @@ -260,7 +260,7 @@ class DAFMapper(object): submission_name = self.make_submission_name(submission_dir) submissionNode = self.get_submission_node(submission_dir) submission_uri = str(submissionNode.uri) - view_name = fromTypedNode(self.model.get_target(view, dafTermOntology['name'])) + view_name = str(fromTypedNode(self.model.get_target(view, dafTermOntology['name']))) submissionView = RDF.Node(RDF.Uri(submission_uri + '/' + view_name)) self.model.add_statement( @@ -287,7 +287,7 @@ class DAFMapper(object): # Add everything I can find for term in terms: - value = self._get_library_attribute(libNode, term) + value = str(self._get_library_attribute(libNode, term)) if value is not None: self.model.add_statement(RDF.Statement(submissionView, term, value))