Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bring in all gene and transcript data, but disallow history (or use different uniquenames) if OGS #2401

Closed
wants to merge 52 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2d741e9
all of the data kind of comes through
nathandunn Mar 11, 2020
28f6391
merging in develop
nathandunn Mar 11, 2020
4cd0af6
updated
nathandunn Mar 11, 2020
39dfeac
fixed gene prodcut inclusion
nathandunn Mar 11, 2020
41842b7
stays on gene when editing gene
nathandunn Mar 11, 2020
6973108
fixed bug when adding bizarre strings and features that may not have …
nathandunn Mar 12, 2020
64a7d32
added use_cds and use_name
nathandunn Mar 12, 2020
ff22bd6
updated usecase
nathandunn Mar 12, 2020
6646aa6
not quite working sadly
nathandunn Mar 13, 2020
65d9605
updated call to handle null
nathandunn Mar 13, 2020
1ff93de
synonym added
nathandunn Mar 13, 2020
ddc68c2
got dbxref working
nathandunn Mar 13, 2020
42aa8b9
all json converted to lower-case for some reason, so keeping as-is
nathandunn Mar 13, 2020
c194875
fixed description coming in properly
nathandunn Mar 13, 2020
8595d44
comments fixed now
nathandunn Mar 13, 2020
09ac850
converted back to use the original
nathandunn Mar 13, 2020
45843bc
gene product is doing round-trip I think
nathandunn Mar 13, 2020
9d75bf5
fixed most of the updateFeature code
nathandunn Mar 13, 2020
7ee4df0
updated for provenance
nathandunn Mar 13, 2020
d22957a
gene product and GO shows up
nathandunn Mar 14, 2020
f11746e
reverted transcript visibility
nathandunn Mar 14, 2020
eaea805
fixed a few here now
nathandunn Mar 16, 2020
fbe5dc6
removed comments
nathandunn Mar 16, 2020
0655e48
fixed some more code
nathandunn Mar 16, 2020
a52b88a
fixed most of the testing issues.
nathandunn Mar 16, 2020
3336474
fixed gwt bug
nathandunn Mar 16, 2020
8dd54f5
fixed a lot of findByUniqueName issues iwth gene product and provenancce
nathandunn Mar 16, 2020
d1e938e
changed ,but likely unused now
nathandunn Mar 16, 2020
b88bb17
more featureUniqueName cleanup and removal of hopefully unused methods
nathandunn Mar 16, 2020
ac06543
fixed the rest of findUniqueNames
nathandunn Mar 16, 2020
29b140e
commented more stuff out ;
nathandunn Mar 16, 2020
f4918b5
Merge branch 'develop' into fix-2372
nathandunn Mar 18, 2020
beffbc9
Merge branch 'develop' into fix-2372
nathandunn Mar 23, 2020
c27711f
Fix organism feature event (#2406)
nathandunn Mar 23, 2020
3d2268b
merged in development
nathandunn Apr 8, 2020
7093d9d
merged in development
nathandunn Apr 8, 2020
87d6ab7
redid json doc id
nathandunn Apr 8, 2020
0238897
working on fixing a few more tests
nathandunn Apr 8, 2020
a487e06
fixed a couple of very small bugs
nathandunn Apr 9, 2020
4fee2d1
Merge branch 'develop' into fix-2372
nathandunn Apr 11, 2020
81f54b5
merged in
nathandunn Apr 11, 2020
983f7d8
Merge branch 'develop' into fix-2372
nathandunn Apr 13, 2020
915d1ad
dbxref fixed
nathandunn Apr 13, 2020
8128f6a
remove extra stuff
nathandunn Apr 13, 2020
da93b74
fixed canned comment
nathandunn Apr 13, 2020
a9927a4
fixed a lot of the product operations
nathandunn Apr 13, 2020
2803f4a
Merge branch 'develop' into fix-2372
nathandunn Apr 14, 2020
5c6cf62
Merge branch 'develop' of https://github.com/GMOD/Apollo into fix-2372
nathandunn Apr 15, 2020
f22e053
Merge branch 'develop' into fix-2372
nathandunn Apr 15, 2020
1356101
fixed deletion error
nathandunn Apr 15, 2020
9b53ba7
handle other cases of GFF3 import for single or multiple values
nathandunn Apr 15, 2020
d21fc26
cleaned up
nathandunn Apr 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
converted back to use the original
nathandunn committed Mar 13, 2020

Verified

This commit was signed with the committer’s verified signature.
hansieodendaal Hansie Odendaal
commit 09ac8508a743dbd92be82372d9786898b5163157
53 changes: 28 additions & 25 deletions grails-app/services/org/bbop/apollo/FeatureService.groovy
Original file line number Diff line number Diff line change
@@ -1519,13 +1519,13 @@ public void setTranslationEnd(Transcript transcript, int translationEnd) {
if (jsonFeature.has(FeatureStringEnum.EXPORT_NOTE.value.toLowerCase())) {
JSONArray exportNoteArray = jsonFeature.getJSONArray(FeatureStringEnum.EXPORT_NOTE.value.toLowerCase())
// String propertyValue = property.get(FeatureStringEnum.VALUE.value)
int rank =0
for(String noteString in exportNoteArray){
Comment comment = new Comment(
feature:gsolFeature,
rank: rank++,
value: noteString
).save()
int rank = 0
for (String noteString in exportNoteArray) {
Comment comment = new Comment(
feature: gsolFeature,
rank: rank++,
value: noteString
).save()
gsolFeature.addToFeatureProperties(comment)
}
}
@@ -1607,35 +1607,38 @@ public void setTranslationEnd(Transcript transcript, int translationEnd) {
}
}
}

// from a GFF3 OGS
if (jsonFeature.has(FeatureStringEnum.EXPORT_DBXREF.value.toLowerCase())) {
JSONArray dbxrefs = jsonFeature.getJSONArray(FeatureStringEnum.EXPORT_DBXREF.value.toLowerCase());
for (String dbxrefString in dbxrefs) {
def (dbString,accessionString) = dbxrefString.split(":")
def (dbString, accessionString) = dbxrefString.split(":")
// JSONObject db = dbxref.getJSONObject(FeatureStringEnum.DB.value);
DB newDB = DB.findOrSaveByName(dbString)
DBXref newDBXref = DBXref.findOrSaveByDbAndAccession(newDB,accessionString).save()
DBXref newDBXref = DBXref.findOrSaveByDbAndAccession(newDB, accessionString).save()
gsolFeature.addToFeatureDBXrefs(newDBXref)
gsolFeature.save()
}
}

// from somethign else
// TODO: this may need to be kept here, unclear
// if (jsonFeature.has(FeatureStringEnum.DBXREFS.value)) {
// JSONArray dbxrefs = jsonFeature.getJSONArray(FeatureStringEnum.DBXREFS.value);
// for (int i = 0; i < dbxrefs.length(); ++i) {
// JSONObject dbxref = dbxrefs.getJSONObject(i);
// JSONObject db = dbxref.getJSONObject(FeatureStringEnum.DB.value);
//
//
// DB newDB = DB.findOrSaveByName(db.getString(FeatureStringEnum.NAME.value))
// DBXref newDBXref = DBXref.findOrSaveByDbAndAccession(
// newDB,
// dbxref.getString(FeatureStringEnum.ACCESSION.value)
// ).save()
// gsolFeature.addToFeatureDBXrefs(newDBXref)
// gsolFeature.save()
// }
// }
if (jsonFeature.has(FeatureStringEnum.DBXREFS.value)) {
JSONArray dbxrefs = jsonFeature.getJSONArray(FeatureStringEnum.DBXREFS.value);
for (int i = 0; i < dbxrefs.length(); ++i) {
JSONObject dbxref = dbxrefs.getJSONObject(i);
JSONObject db = dbxref.getJSONObject(FeatureStringEnum.DB.value);


DB newDB = DB.findOrSaveByName(db.getString(FeatureStringEnum.NAME.value))
DBXref newDBXref = DBXref.findOrSaveByDbAndAccession(
newDB,
dbxref.getString(FeatureStringEnum.ACCESSION.value)
).save()
gsolFeature.addToFeatureDBXrefs(newDBXref)
gsolFeature.save()
}
}
// TODO: gene_product
if (jsonFeature.has(FeatureStringEnum.GENE_PRODUCT.value)) {
// gsolFeature.setFeatureSynonyms(jsonFeature.getString(FeatureStringEnum.SYNONYMS.value));