Simplify linking fastq files to their library id.
[htsworkflow.git] / htsworkflow / submission / fastqname.py
index f749d4096246529b264d495d883cad6cb7c005fb..9dd52a0319fb9e9efa230e68344ef53156645be7 100644 (file)
@@ -10,7 +10,13 @@ FASTQ_RE = re.compile(
     'c(?P<cycle>[\d]+)_l(?P<lane>[\d]+)(_r(?P<read>[\d]))?\.fastq')
 
 class FastqName(collections.Mapping):
+    """Utility class to convert to the standardized submission fastq name.
+    """
     def __init__(self, is_paired=None, **kwargs):
+        """Create a fastq name handler.
+
+        Takes filename or common attributes like flowcell, lib_id, lane, read, cycle
+        """
         self._attributes = ('flowcell', 'lib_id', 'lane', 'read', 'cycle')
         self._is_paired = is_paired
 
@@ -28,7 +34,6 @@ class FastqName(collections.Mapping):
                 value = kwargs[k]
             self[k] = value
 
-
     def _init_by_filename(self, filename):
         match = FASTQ_RE.match(filename)
         if match is None: