FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

removes generic getColumn calls · biojava/biojava@f26563d · GitHub

Commit f26563d

Browse files
Sebastian Bittrich
committed
removes generic getColumn calls
1 parent 9f05a76 commit f26563d

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

‎biojava-structure/src/main/java/org/biojava/nbio/structure/io/cif/CifFileConsumerImpl.java‎

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,20 +1196,20 @@ public void finish() {
11961196
Map<String,List<SeqMisMatch>> misMatchMap = new HashMap<>();
11971197
for (int rowIndex = 0; rowIndex < structRefSeqDif.getRowCount(); rowIndex++) {
11981198
SeqMisMatch seqMisMatch = new SeqMisMatchImpl();
1199-
seqMisMatch.setDetails(structRefSeqDif.getColumn("details").getStringData(rowIndex));
1199+
seqMisMatch.setDetails(structRefSeqDif.getDetails().get(rowIndex));
12001200

1201-
String insCode = structRefSeqDif.getColumn("pdbx_pdb_ins_code").getStringData(rowIndex);
1201+
String insCode = structRefSeqDif.getPdbxPdbInsCode().get(rowIndex);
12021202
if (insCode != null && insCode.equals("?")) {
12031203
insCode = null;
12041204
}
12051205
seqMisMatch.setInsCode(insCode);
1206-
seqMisMatch.setOrigGroup(structRefSeqDif.getColumn("db_mon_id").getStringData(rowIndex));
1207-
seqMisMatch.setPdbGroup(structRefSeqDif.getColumn("mon_id").getStringData(rowIndex));
1208-
seqMisMatch.setPdbResNum(structRefSeqDif.getColumn("pdbx_auth_seq_num").getStringData(rowIndex));
1209-
seqMisMatch.setUniProtId(structRefSeqDif.getColumn("pdbx_seq_db_accession_code").getStringData(rowIndex));
1210-
seqMisMatch.setSeqNum(Integer.parseInt(structRefSeqDif.getColumn("seq_num").getStringData(rowIndex)));
1206+
seqMisMatch.setOrigGroup(structRefSeqDif.getDbMonId().get(rowIndex));
1207+
seqMisMatch.setPdbGroup(structRefSeqDif.getMonId().get(rowIndex));
1208+
seqMisMatch.setPdbResNum(structRefSeqDif.getPdbxAuthSeqNum().get(rowIndex));
1209+
seqMisMatch.setUniProtId(structRefSeqDif.getPdbxSeqDbAccessionCode().get(rowIndex));
1210+
seqMisMatch.setSeqNum(structRefSeqDif.getSeqNum().get(rowIndex));
12111211

1212-
String strandId = structRefSeqDif.getColumn("pdbx_pdb_strand_id").getStringData(rowIndex);
1212+
String strandId = structRefSeqDif.getPdbxPdbStrandId().get(rowIndex);
12131213
List<SeqMisMatch> seqMisMatches = misMatchMap.computeIfAbsent(strandId, k -> new ArrayList<>());
12141214
seqMisMatches.add(seqMisMatch);
12151215
}
@@ -1283,23 +1283,23 @@ private void addAncilliaryEntityData(int asymRowIndex, EntityInfo entityInfo) {
12831283
// This is a potentially huge assumption...
12841284

12851285
for (int rowIndex = 0; rowIndex < entitySrcGen.getRowCount(); rowIndex++) {
1286-
if (entitySrcGen.getColumn("entity_id").getStringData(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
1286+
if (entitySrcGen.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
12871287
continue;
12881288
}
12891289

12901290
addInformationFromEntitySrcGen(rowIndex, entityInfo);
12911291
}
12921292

12931293
for (int rowIndex = 0; rowIndex < entitySrcNat.getRowCount(); rowIndex++) {
1294-
if (entitySrcNat.getColumn("entity_id").getStringData(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
1294+
if (entitySrcNat.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
12951295
continue;
12961296
}
12971297

12981298
addInformationFromEntitySrcNat(rowIndex, entityInfo);
12991299
}
13001300

13011301
for (int rowIndex = 0; rowIndex < entitySrcSyn.getRowCount(); rowIndex++) {
1302-
if (entitySrcSyn.getColumn("entity_id").getStringData(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
1302+
if (entitySrcSyn.getEntityId().get(rowIndex).equals(structAsym.getEntityId().get(asymRowIndex))) {
13031303
continue;
13041304
}
13051305

@@ -1308,27 +1308,27 @@ private void addAncilliaryEntityData(int asymRowIndex, EntityInfo entityInfo) {
13081308
}
13091309

13101310
private void addInformationFromEntitySrcSyn(int rowIndex, EntityInfo entityInfo) {
1311-
entityInfo.setOrganismCommon(entitySrcSyn.getColumn("organism_common_name").getStringData(rowIndex));
1312-
entityInfo.setOrganismScientific(entitySrcSyn.getColumn("organism_scientific").getStringData(rowIndex));
1313-
entityInfo.setOrganismTaxId(entitySrcSyn.getColumn("ncbi_taxonomy_id").getStringData(rowIndex));
1311+
entityInfo.setOrganismCommon(entitySrcSyn.getOrganismCommonName().get(rowIndex));
1312+
entityInfo.setOrganismScientific(entitySrcSyn.getOrganismScientific().get(rowIndex));
1313+
entityInfo.setOrganismTaxId(entitySrcSyn.getNcbiTaxonomyId().get(rowIndex));
13141314
}
13151315

13161316
private void addInformationFromEntitySrcNat(int rowIndex, EntityInfo entityInfo) {
1317-
entityInfo.setAtcc(entitySrcNat.getColumn("pdbx_atcc").getStringData(rowIndex));
1318-
entityInfo.setCell(entitySrcNat.getColumn("pdbx_cell").getStringData(rowIndex));
1319-
entityInfo.setOrganismCommon(entitySrcNat.getColumn("common_name").getStringData(rowIndex));
1320-
entityInfo.setOrganismScientific(entitySrcNat.getColumn("pdbx_organism_scientific").getStringData(rowIndex));
1321-
entityInfo.setOrganismTaxId(entitySrcNat.getColumn("pdbx_ncbi_taxonomy_id").getStringData(rowIndex));
1317+
entityInfo.setAtcc(entitySrcNat.getPdbxAtcc().get(rowIndex));
1318+
entityInfo.setCell(entitySrcNat.getPdbxCell().get(rowIndex));
1319+
entityInfo.setOrganismCommon(entitySrcNat.getCommonName().get(rowIndex));
1320+
entityInfo.setOrganismScientific(entitySrcNat.getPdbxOrganismScientific().get(rowIndex));
1321+
entityInfo.setOrganismTaxId(entitySrcNat.getPdbxNcbiTaxonomyId().get(rowIndex));
13221322
}
13231323

13241324
private void addInformationFromEntitySrcGen(int rowIndex, EntityInfo entityInfo) {
1325-
entityInfo.setAtcc(entitySrcGen.getColumn("pdbx_gene_src_atcc").getStringData(rowIndex));
1326-
entityInfo.setCell(entitySrcGen.getColumn("pdbx_gene_src_cell").getStringData(rowIndex));
1327-
entityInfo.setOrganismCommon(entitySrcGen.getColumn("gene_src_common_name").getStringData(rowIndex));
1328-
entityInfo.setOrganismScientific(entitySrcGen.getColumn("pdbx_gene_src_scientific_name").getStringData(rowIndex));
1329-
entityInfo.setOrganismTaxId(entitySrcGen.getColumn("pdbx_gene_src_ncbi_taxonomy_id").getStringData(rowIndex));
1330-
entityInfo.setExpressionSystemTaxId(entitySrcGen.getColumn("pdbx_host_org_ncbi_taxonomy_id").getStringData(rowIndex));
1331-
entityInfo.setExpressionSystem(entitySrcGen.getColumn("pdbx_host_org_scientific_name").getStringData(rowIndex));
1325+
entityInfo.setAtcc(entitySrcGen.getPdbxGeneSrcAtcc().get(rowIndex));
1326+
entityInfo.setCell(entitySrcGen.getPdbxGeneSrcCell().get(rowIndex));
1327+
entityInfo.setOrganismCommon(entitySrcGen.getGeneSrcCommonName().get(rowIndex));
1328+
entityInfo.setOrganismScientific(entitySrcGen.getPdbxGeneSrcScientificName().get(rowIndex));
1329+
entityInfo.setOrganismTaxId(entitySrcGen.getPdbxGeneSrcNcbiTaxonomyId().get(rowIndex));
1330+
entityInfo.setExpressionSystemTaxId(entitySrcGen.getPdbxHostOrgNcbiTaxonomyId().get(rowIndex));
1331+
entityInfo.setExpressionSystem(entitySrcGen.getPdbxHostOrgScientificName().get(rowIndex));
13321332
}
13331333

13341334
private void setStructNcsOps() {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL