def parse_tagLength_dist(self):
        """parses and plots tag length distribution files"""
        # Find and parse homer tag length distribution reports
        for f in self.find_log_files('homer/LengthDistribution', filehandles=True):
            s_name = os.path.basename(f['root'])
            s_name = self.clean_s_name(s_name, f['root'])
            parsed_data = self.parse_length_dist(f)
            if parsed_data is not None:
                if s_name in self.tagdir_data['length']:
                    log.debug("Duplicate Length Distribution sample log found! Overwriting: {}".format(s_name))
                self.add_data_source(f, s_name, section='length')
                self.tagdir_data['length'][s_name] = parsed_data

        self.tagdir_data['length'] = self.ignore_samples(self.tagdir_data['length'])
        if len(self.tagdir_data['length']) > 0:
            self.add_section (
                name = 'Tag Length Distribution',
                anchor = 'homer-tagLength',
                description = 'This plot shows the distribution of tag length.',
                helptext = 'This is a good quality control for tag length inputed into Homer.',
                plot = self.length_dist_chart()
            )
def parse_tagLength_dist ( self ) : for f in self . find_log_files ( 'homer/LengthDistribution' , filehandles = True ) : s_name = os . path . basename ( f [ 'root' ] ) s_name = self . clean_s_name ( s_name , f [ 'root' ] ) parsed_data = self . parse_length_dist ( f ) if parsed_data is not None : if s_name in self . tagdir_data [ 'length' ] : log . debug ( "Duplicate Length Distribution sample log found! Overwriting: {}" . format ( s_name ) ) self . add_data_source ( f , s_name , section = 'length' ) self . tagdir_data [ 'length' ] [ s_name ] = parsed_data self . tagdir_data [ 'length' ] = self . ignore_samples ( self . tagdir_data [ 'length' ] ) if len ( self . tagdir_data [ 'length' ] ) > 0 : self . add_section ( name = 'Tag Length Distribution' , anchor = 'homer-tagLength' , description = 'This plot shows the distribution of tag length.' , helptext = 'This is a good quality control for tag length inputed into Homer.' , plot = self . length_dist_chart ( ) )
parses and plots tag length distribution files