Beispiel #1
0
    def __init__(self, *args):
        #
        # Implementation notes: find all the bas/bax files, and group
        # them together by movieName
        #
        basFilenames = []
        for arg in args:
            if arg.endswith(".fofn"):
                for fn in readFofn(arg):
                    basFilenames.append(fn)
            else:
                basFilenames.append(arg)

        movieNames = map(sniffMovieName, basFilenames)
        movieNamesAndFiles = sorted(zip(movieNames, basFilenames))

        self.readers = OrderedDict(
            [ (k , BasH5Reader(*[val[1] for val in v]))
              for k, v in groupby(movieNamesAndFiles, lambda t: t[0]) ])
Beispiel #2
0
    def __init__(self, *args):
        #
        # Implementation notes: find all the bas/bax files, and group
        # them together by movieName
        #
        basFilenames = []
        for arg in args:
            if arg.endswith(".fofn"):
                for fn in readFofn(arg):
                    basFilenames.append(fn)
            else:
                basFilenames.append(arg)

        movieNames = list(map(sniffMovieName, basFilenames))
        movieNamesAndFiles = sorted(zip(movieNames, basFilenames))

        self.readers = OrderedDict(
            [ (k , BasH5Reader(*[val[1] for val in v]))
              for k, v in groupby(movieNamesAndFiles, lambda t: t[0]) ])
Beispiel #3
0
    def __init__(self, *args):

        bcFilenames = []
        for arg in args:
            if arg.endswith(".fofn"):
                for fn in readFofn(arg):
                    bcFilenames.append(fn)
            else:
                bcFilenames.append(arg)

        self._bcH5s = [BarcodeH5Reader(fname) for fname in
                       bcFilenames]
        self._byMovie = {}
        for bc in self._bcH5s:
            if bc.movieName not in self._byMovie:
                self._byMovie[bc.movieName] = [bc]
            else:
                self._byMovie[bc.movieName].append(bc)

        self.mpReaders = { movieName: parts[0] if len(parts) == 1 else MPBarcodeH5Reader(parts)
                           for movieName, parts in self._byMovie.iteritems() }
Beispiel #4
0
    def __init__(self, *args):

        bcFilenames = []
        for arg in args:
            if arg.endswith(".fofn"):
                for fn in readFofn(arg):
                    bcFilenames.append(fn)
            else:
                bcFilenames.append(arg)

        self._bcH5s = [BarcodeH5Reader(fname) for fname in
                       bcFilenames]
        self._byMovie = {}
        for bc in self._bcH5s:
            if bc.movieName not in self._byMovie:
                self._byMovie[bc.movieName] = [bc]
            else:
                self._byMovie[bc.movieName].append(bc)

        self.mpReaders = { movieName: parts[0] if len(parts) == 1 else MPBarcodeH5Reader(parts)
                           for movieName, parts in self._byMovie.iteritems() }