Esempio n. 1
0
 def sra_line(self):
     """Will generate the corresponding entry for SRA submission"""
     # accession
     line =  [self.s.info['bioproject']]
     line += [self.s.info['biosample']]
     # name
     line += [self.s.short_name]
     line += [self.s.short_name]
     # description
     machine = 'Illumina MiSeq' if 'machine' not in self.s.__dict__ else self.s.machine
     desc = "Soda lake '%s' (code %s) sampled on %s and run on a %s"
     desc += " -- run number %i, pool number %i, barcode number %i."
     line += [desc % (self.s.info['real_name'][0], self.s.short_name, self.s.info['date'],
                      machine, self.s.pool.run_num, self.s.pool.num, self.s.num)]
     # library_strategy
     line += [default_sra['library_strategy']]
     line += [default_sra['library_source']]
     line += [default_sra['library_selection']]
     line += [default_sra['library_layout']]
     line += [default_sra['platform']]
     line += [default_sra['instrument_model']]
     # design_description
     line += [self.s.pool.info['design_description']]
     # reference_genome_assembly
     line += ['', '']
     # forward_read_length
     line += [self.forward_read_length, self.reverse_read_length]
     # forward
     line += [default_sra['forward_filetype'], self.base_name.format("forward")]
     line += [md5sum(self.s.p.raw_forward_gz)]
     # reverse
     line += [default_sra['reverse_filetype'], self.base_name.format("reverse")]
     line += [md5sum(self.s.p.raw_reverse_gz)]
     # return
     return line
Esempio n. 2
0
 def run_parameters(self):
     """Generate the 'run' required parameters for submitting this sample to ENA"""
     return {
         'unique_name':        "run" + self.s.name,
         'experiment_name':    "experiment_" + self.s.short_name,
         'fwd_filename':       self.base_name.format('forward'),
         'fwd_checksum':       md5sum(self.s.p.raw_forward_gz),
         'rev_filename':       self.base_name.format('reverse'),
         'rev_checksum':       md5sum(self.s.p.raw_reverse_gz),
     }
Esempio n. 3
0
 def md5(self):
     """Return the md5 checksum."""
     return md5sum(self.path)
Esempio n. 4
0
 def md5(self):
     """Return the md5 checksum."""
     return md5sum(self.path)
Esempio n. 5
0
    def rev_md5(self): return md5sum(self.s.p.raw_sff)

###############################################################################
class Pyrosample(object):
Esempio n. 6
0
 def fwd_md5(self): return md5sum(self.s.p.raw_sff)
 @property