示例#1
0
    def chemistryBarcodeTriple(self):
        """
        The chemistry barcode triple consists of (BindingKit,
        SequencingKit, SoftwareVersion) and is written on the
        instrument to the bax file as of primary version 2.1.  Prior
        to that, it was only written in the metadata.xml.

        If the triple is not found in the bas file, we look in the
        metadata.xml---throwing an exception if the xml file is not
        found or can't be parsed.
        """
        try:
            bindingKit = self.file["/ScanData/RunInfo"].attrs["BindingKit"]
            sequencingKit = self.file["/ScanData/RunInfo"].attrs[
                "SequencingKit"]
            # version string in bas file looks like "2.1.1.1.x", we have to extract
            # the "2.1.1"
            tmp = self.file["/PulseData/BaseCalls"].attrs["ChangeListID"]
            swVersion = ".".join(tmp.split(".")[0:2])
            return (bindingKit, sequencingKit, swVersion)
        except:
            movieName = self.movieName
            _up = op.dirname(op.dirname(self.filename))
            metadataLocation = op.join(_up, movieName + ".metadata.xml")
            triple = tripleFromMetadataXML(metadataLocation)
            return triple
示例#2
0
    def chemistryBarcodeTriple(self):
        """
        The chemistry barcode triple consists of (BindingKit,
        SequencingKit, SoftwareVersion) and is written on the
        instrument to the bax file as of primary version 2.1.  Prior
        to that, it was only written in the metadata.xml.

        If the triple is not found in the bas file, we look in the
        metadata.xml---throwing an exception if the xml file is not
        found or can't be parsed.
        """
        try:
            bindingKit      = self.file["/ScanData/RunInfo"].attrs["BindingKit"]
            sequencingKit   = self.file["/ScanData/RunInfo"].attrs["SequencingKit"]
            # version string in bas file looks like "2.1.1.1.x", we have to extract
            # the "2.1.1"
            tmp = self.file["/PulseData/BaseCalls"].attrs["ChangeListID"]
            swVersion= ".".join(tmp.split(".")[0:2])
            return (bindingKit, sequencingKit, swVersion)
        except:
            movieName = self.movieName
            _up = op.dirname(op.dirname(self.filename))
            metadataLocation = op.join(_up, movieName + ".metadata.xml")
            triple = tripleFromMetadataXML(metadataLocation)
            return triple
示例#3
0
 def _chemistryBarcodeTripleFromMetadataXML(self):
     try:
         movieName = self.movieName
         _up = op.dirname(op.dirname(self.filename))
         metadataLocation = op.join(_up, movieName + ".metadata.xml")
         triple = tripleFromMetadataXML(metadataLocation)
         return triple
     except ChemistryLookupError:
         return None
示例#4
0
 def _chemistryBarcodeTripleFromMetadataXML(self):
     try:
         movieName = self.movieName
         _up = op.dirname(op.dirname(self.filename))
         metadataLocation = op.join(_up, movieName + ".metadata.xml")
         triple = tripleFromMetadataXML(metadataLocation)
         return triple
     except ChemistryLookupError:
         return None