Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
16 | 2 | 6 | 0.956 | compound_stmt |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 16 | 962 | BioSQL/Loader.py |
2 | 16 | 1013 | BioSQL/Loader.py |
| ||||
def _get_seqfeature_dbxref(self,seqfeature_id,dbxref_id,rank): """ Check for a pre-existing seqfeature_dbxref entry with the passed seqfeature_id and dbxref_id. If one does not exist, insert new data """ # Check for an existing record sql = "SELECT seqfeature_id, dbxref_id FROM seqfeature_dbxref " "WHERE seqfeature_id = '%s' AND dbxref_id = '%s'" result = self.adaptor.execute_and_fetch_col0(sql,(seqfeature_id,dbxref_id)) # If there was a record, return without executing anything, else create # the record and return if result: return result return self._add_seqfeature_dbxref(seqfeature_id,dbxref_id,rank) |
| ||||
def _get_bioentry_dbxref(self,bioentry_id,dbxref_id,rank): """ Check for a pre-existing bioentry_dbxref entry with the passed seqfeature_id and dbxref_id. If one does not exist, insert new data """ # Check for an existing record sql = "SELECT bioentry_id, dbxref_id FROM bioentry_dbxref " "WHERE bioentry_id = '%s' AND dbxref_id = '%s'" result = self.adaptor.execute_and_fetch_col0(sql,(bioentry_id,dbxref_id)) # If there was a record, return without executing anything, else create # the record and return if result: return result return self._add_bioentry_dbxref(bioentry_id,dbxref_id,rank) |
| |||
def [[#variable6189e200]](self, [[#variable6189e160]],dbxref_id,rank): [[#variable6189e0e0]] # Check for an existing record sql = [[#variable6189e080]] [[#variable6189e020]] result = self.adaptor.execute_and_fetch_col0(sql,( [[#variable6189e160]],dbxref_id)) # If there was a record, return without executing anything, else create # the record and return if result: return result return self. [[#variable761d5f80]]( [[#variable6189e160]],dbxref_id,rank) |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#6189e200]] | _get_bioentry_dbxref |
1 | 2 | [[#6189e200]] | _get_seqfeature_dbxref |
2 | 1 | [[#6189e160]] | bioentry_id |
2 | 2 | [[#6189e160]] | seqfeature_id |
3 | 1 | [[#6189e0e0]] | """ Check for a pre-existing bioentry_dbxref entry with the passed seqfeature_id and dbxref_id. If one does not exist, insert new data """ |
3 | 2 | [[#6189e0e0]] | """ Check for a pre-existing seqfeature_dbxref entry with the passed seqfeature_id and dbxref_id. If one does not exist, insert new data """ |
4 | 1 | [[#6189e080]] | "SELECT bioentry_id, dbxref_id FROM bioentry_dbxref " |
4 | 2 | [[#6189e080]] | "SELECT seqfeature_id, dbxref_id FROM seqfeature_dbxref " |
5 | 1 | [[#6189e020]] | "WHERE bioentry_id = '%s' AND dbxref_id = '%s'" |
5 | 2 | [[#6189e020]] | "WHERE seqfeature_id = '%s' AND dbxref_id = '%s'" |
6 | 1 | [[#761d5f80]] | _add_bioentry_dbxref |
6 | 2 | [[#761d5f80]] | _add_seqfeature_dbxref |