def _get_derived_feature_types(self, limit):
        """
        Make a pass through the feature table in order to properly type
        the FBal (allele) features, which are derived either from other
        sequence features (which can be things like RNAi products)
        or transgenic-transposons.  We'll save the allele type into a hasmap.

        :param limit:
        :return:

        """

        if self.test_mode:
            graph = self.testgraph
        else:
            graph = self.graph
        model = Model(graph)
        raw = '/'.join((self.rawdir, 'feature_relationship'))
        LOG.info("determining some feature types based on relationships")
        with open(raw, 'r') as f:
            f.readline()  # read the header row; skip
            filereader = csv.reader(f, delimiter='\t', quotechar='\"')
            for line in filereader:
                (feature_relationship_id, subject_id, object_id, name, rank,
                 value) = line

                if name == 'derived_tp_assoc_alleles':
                    # derived_tp_assoc_alleles
                    self.feature_types[subject_id] = \
                        self.globaltt['transgenic_insertion']
                    sid = self.idhash['allele'].get(subject_id)
                    model.addType(sid, self.feature_types[subject_id])
                elif name == 'derived_sf_assoc_alleles':
                    # only take the derived_sf_assoc_alleles
                    # my subject is a reagent_targeted_gene
                    # my object is the dsRNA
                    self.feature_types[subject_id] = \
                        self.globaltt['reagent_targeted_gene']
                    sid = self.idhash['allele'].get(subject_id)
                    model.addType(sid, self.feature_types[subject_id])

                else:
                    continue

        return
def _get_derived_feature_types ( self , limit ) : if self . test_mode : graph = self . testgraph else : graph = self . graph model = Model ( graph ) raw = '/' . join ( ( self . rawdir , 'feature_relationship' ) ) LOG . info ( "determining some feature types based on relationships" ) with open ( raw , 'r' ) as f : f . readline ( ) filereader = csv . reader ( f , delimiter = '\t' , quotechar = '\"' ) for line in filereader : ( feature_relationship_id , subject_id , object_id , name , rank , value ) = line if name == 'derived_tp_assoc_alleles' : self . feature_types [ subject_id ] = self . globaltt [ 'transgenic_insertion' ] sid = self . idhash [ 'allele' ] . get ( subject_id ) model . addType ( sid , self . feature_types [ subject_id ] ) elif name == 'derived_sf_assoc_alleles' : self . feature_types [ subject_id ] = self . globaltt [ 'reagent_targeted_gene' ] sid = self . idhash [ 'allele' ] . get ( subject_id ) model . addType ( sid , self . feature_types [ subject_id ] ) else : continue return
Make a pass through the feature table in order to properly type
        the FBal (allele) features, which are derived either from other
        sequence features (which can be things like RNAi products)
        or transgenic-transposons.  We'll save the allele type into a hasmap.

        :param limit:
        :return: