Skip to content

Commit

Permalink
fixes #2567 (#2572)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Feb 12, 2021
1 parent 2775928 commit 07bea08
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ Features
- Fix empty attribute list in annotation panel [2552](https://github.com/GMOD/Apollo/issues/2552).
- Added ability to use posts to sequence methods [2555](https://github.com/GMOD/Apollo/pull/2558).
- Added system info web service [2557](https://github.com/GMOD/Apollo/pull/2557).
- Add "merged from" comment to merged in transcript and gene [2567](https://github.com/GMOD/Apollo/issues/2567).

Bug Fixes:

- Bad coordinate value in genomic element details screen in annotator panel [2559](https://github.com/GMOD/Apollo/issues/2559).
- Web services indicated user had no organism permissions when checking the login [2554](https://github.com/GMOD/Apollo/issues/2554).
- Vcf reads as ISO-8859-1 instead of UTF-8 from reader mangling some symbols. [2498](https://github.com/GMOD/Apollo/issues/2498).
Expand Down
1 change: 1 addition & 0 deletions docker-files/docker-apollo-config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ apollo {
overlapper_class = System.getenv("WEBAPOLLO_OVERLAPPER_CLASS") ?: "org.bbop.apollo.sequence.OrfOverlapper"
use_cds_for_new_transcripts = checkBooleanEnvironment("WEBAPOLLO_CDS_FOR_NEW_TRANSCRIPTS",false)
count_annotations = checkBooleanEnvironment("WEBAPOLLO_COUNT_ANNOTATIONS",true)
add_merged_commented = checkBooleanEnvironment("WEBAPOLLO_ADD_MERGED_COMMENT",true)
phone.phoneHome = checkBooleanEnvironment("WEBAPOLLO_PHONE_HOME",true)
feature_has_dbxrefs = checkBooleanEnvironment("WEBAPOLLO_FEATURE_HAS_DBXREFS",true)
feature_has_attributes = checkBooleanEnvironment("WEBAPOLLO_FEATURE_HAS_ATTRS",true)
Expand Down
15 changes: 15 additions & 0 deletions docs/Configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,21 @@ grails {
}
```

### Suppress add merged comments

By default, when you merge two isoforms, it will automatically create a comment indicating the name and unique ID from the
consumed isoform that was used as a comment.


```
grails {
apollo.add_merged_comment = false
apollo {
add_merged_comment = false
}
}
```



### JBrowse Plugins and Configuration
Expand Down
1 change: 1 addition & 0 deletions grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ apollo {
track_name_comparator = "/config/track_name_comparator.js"
use_cds_for_new_transcripts = false
count_annotations = true
add_merged_comment = true
transcript_overlapper = "CDS"
feature_has_dbxrefs = true
feature_has_attributes = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.bbop.apollo
import grails.converters.JSON
import groovy.json.JsonBuilder
import org.apache.shiro.SecurityUtils
import org.bbop.apollo.Feature
import org.bbop.apollo.event.AnnotationEvent
import org.bbop.apollo.event.AnnotationListener
import org.bbop.apollo.gwt.shared.FeatureStringEnum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class ConfigWrapperService {
return grailsApplication.config.apollo.count_annotations
}

Boolean getAddMergedComment(){
return grailsApplication.config.apollo.add_merged_comment
}

String getTranscriptOverlapper() {
return grailsApplication.config.apollo.transcript_overlapper
}
Expand Down
3 changes: 2 additions & 1 deletion grails-app/services/org/bbop/apollo/PermissionService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@ class PermissionService {
Sequence checkPermissions(JSONObject inputObject, PermissionEnum requiredPermissionEnum) {
Organism organism

validateSessionForJsonObject(inputObject)
// NOTE: if coming through web-socket, we will not have a session
// validateSessionForJsonObject(inputObject)
String sequenceName = getSequenceNameFromInput(inputObject)

User user = getCurrentUser(inputObject)
Expand Down
10 changes: 10 additions & 0 deletions grails-app/services/org/bbop/apollo/TranscriptService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ class TranscriptService {

// services
def featureService
def featurePropertyService
def featureRelationshipService
def nameService
def nonCanonicalSplitSiteService
def sequenceService
def configWrapperService

/** Retrieve the CDS associated with this transcript. Uses the configuration to determine
* which child is a CDS. The CDS object is generated on the fly. Returns <code>null</code>
Expand Down Expand Up @@ -483,6 +485,10 @@ class TranscriptService {
if (gene1 && gene2) {
if (gene1 != gene2) {
log.debug "Gene1 != Gene2; merging genes together"
if(configWrapperService.addMergedComment) {
Comment geneMergeComment = new Comment(value: "Merged from ${gene2.name} / ${gene2.uniqueName} ", feature: gene1).save()
featurePropertyService.addComment(gene1, geneMergeComment)
}
List<Transcript> gene2Transcripts = getTranscripts(gene2)
if (gene2Transcripts) {
gene2Transcripts.retainAll(featureService.getOverlappingTranscripts(transcript1))
Expand All @@ -505,6 +511,10 @@ class TranscriptService {

// Delete the empty transcript from the gene, if gene not already deleted
if (!flag) {
if(configWrapperService.addMergedComment){
Comment transcriptMergeComment = new Comment(value: "Merged from ${transcript2.name} / ${transcript2.uniqueName} ", feature: transcript1).save()
featurePropertyService.addComment(transcript1,transcriptMergeComment)
}
featureService.mergeIsoformBoundaries(transcript1,transcript2)
def childFeatures = featureRelationshipService.getChildren(transcript2)
featureRelationshipService.deleteChildrenForTypes(transcript2)
Expand Down
1 change: 1 addition & 0 deletions sample-h2-apollo-config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ environments {
// common_data_directory = "/opt/temporary/apollo"
// calculate_non_canonical_splice_sites = false
// store_orig_id = false
// add_merged_comment = true
// count_annotations = false
// fa_to_twobit_exe = "/usr/local/bin/blat" // get form https://genome.ucsc.edu/goldenPath/help/blatSpec.html
// sequence_search_tools {
Expand Down
1 change: 1 addition & 0 deletions sample-mysql-apollo-config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ environments {
// common_data_directory = "/opt/temporary/apollo"
// store_orig_id = false
// count_annotations = false
// add_merged_comment = true
// calculate_non_canonical_splice_sites = false
// fa_to_twobit_exe = "/usr/local/bin/faToTwoBit" // get from // https://genome.ucsc.edu/goldenPath/help/blatSpec.html
// sequence_search_tools {
Expand Down
1 change: 1 addition & 0 deletions sample-postgres-apollo-config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ environments {
// only_owners_delete = true
// common_data_directory = "/opt/temporary/apollo"
// calculate_non_canonical_splice_sites = false
// add_merged_comment = true
// count_annotations = false
// store_orig_id = false
// fa_to_twobit_exe = "/usr/local/bin/faToTwoBit" // get from // https://genome.ucsc.edu/goldenPath/help/blatSpec.html
Expand Down

0 comments on commit 07bea08

Please sign in to comment.