Commit 3f15af76 authored by ckuchly's avatar ckuchly
Browse files

Add index information for sample declaration

parent 1a0a3f8c
......@@ -22,13 +22,14 @@ class Sample(object):
AVAILABLE_TYPES = ["pe", "se", "ose", "ope", "mp"]
def __init__(self, sample_id, reads1, reads2 = None, name = None, description = None, type = None,
def __init__(self, sample_id, reads1, reads2 = None,index = None, name = None, description = None, type = None,
insert_size = None, species = None, nb_sequences = None, full_size = None, id = None ):
self.sample_id = sample_id
self.name = name
self.description = description
self.reads1 = reads1
self.reads2 = reads2
self.index = index
self.insert_size = insert_size
self.nb_sequences = nb_sequences
self.full_size = full_size
......@@ -41,6 +42,9 @@ class Sample(object):
if isinstance(reads2, str) :
self.reads2 = [reads2]
if isinstance(index, str) :
self.index = [index]
if self.type is None:
if self.reads2 :
......@@ -94,12 +98,13 @@ class Sample(object):
raise UnsavedRunError()
def __str__(self, *args, **kwargs):
return "sid={sid}; name={name}; desc={desc}; r1={r1}; r2={r2}; insize={insize}; nbs={nbs}; fsize={fsize}; spec={spec}; t={t}".format(
return "sid={sid}; name={name}; desc={desc}; r1={r1}; r2={r2}; i={i}; insize={insize}; nbs={nbs}; fsize={fsize}; spec={spec}; t={t}".format(
sid = self.sample_id or '',
name = self.name or '',
desc = self.description or '',
r1 = self.reads1 or [],
r2 = self.reads2 or [],
i = self.index or [],
insize = self.insert_size or '',
nbs = self.nb_sequences or '',
fsize = self.full_size or '',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment