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

Fix splice site detection behavior #1880

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 10 additions & 2 deletions grails-app/services/org/bbop/apollo/ConfigWrapperService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,19 @@ class ConfigWrapperService {
}

List<String> getSpliceDonorSites(){
return grailsApplication.config.apollo.splice_donor_sites
List<String> sites = new ArrayList<String>()
grailsApplication.config.apollo.splice_donor_sites.each {
sites.add(it.toLowerCase())
}
return sites
}

List<String> getSpliceAcceptorSites(){
return grailsApplication.config.apollo.splice_acceptor_sites
List<String> sites = new ArrayList<String>()
grailsApplication.config.apollo.splice_acceptor_sites.each {
sites.add(it.toLowerCase())
}
return sites
}

int getDefaultMinimumIntronSize() {
Expand Down
8 changes: 4 additions & 4 deletions grails-app/services/org/bbop/apollo/ExonService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class ExonService {
}
String seq = residues.substring(coordinate, coordinate + 2);

if (SequenceTranslationHandler.getSpliceDonorSites().contains(seq)) {
if (SequenceTranslationHandler.getSpliceDonorSites().contains(seq.toLowerCase())) {
if (exon.getFeatureLocation().getStrand() == -1) {
setExonBoundaries(exon,featureService.convertLocalCoordinateToSourceCoordinate(gene,coordinate)+1,exon.getFeatureLocation().getFmax())
} else {
Expand Down Expand Up @@ -292,7 +292,7 @@ class ExonService {
String seq = residues.substring(coordinate, coordinate + 2);

// log.debug "seq ${seq} in ${SequenceTranslationHandler.spliceDonorSites}"
if (SequenceTranslationHandler.getSpliceDonorSites().contains(seq)) {
if (SequenceTranslationHandler.getSpliceDonorSites().contains(seq.toLowerCase())) {
if (exon.getStrand() == -1) {
setExonBoundaries(exon, featureService.convertLocalCoordinateToSourceCoordinate(gene,coordinate) + 1, exon.getFmax());
} else {
Expand Down Expand Up @@ -334,7 +334,7 @@ class ExonService {
throw new AnnotationException("Cannot set to upstream acceptor - will overlap previous exon");
}
String seq = residues.substring(coordinate, coordinate + 2);
if (SequenceTranslationHandler.getSpliceAcceptorSites().contains(seq)) {
if (SequenceTranslationHandler.getSpliceAcceptorSites().contains(seq.toLowerCase())) {
if (exon.getStrand() == -1) {
setExonBoundaries(exon, exon.getFmin(), featureService.convertLocalCoordinateToSourceCoordinate(gene,coordinate) - 1);
} else {
Expand All @@ -360,7 +360,7 @@ class ExonService {
throw new AnnotationException("Cannot set to downstream acceptor - will remove exon");
}
String seq = residues.substring(coordinate, coordinate + 2);
if (SequenceTranslationHandler.getSpliceAcceptorSites().contains(seq)) {
if (SequenceTranslationHandler.getSpliceAcceptorSites().contains(seq.toLowerCase())) {
if (exon.getStrand() == -1) {
setExonBoundaries(exon, exon.getFmin(), featureService.convertLocalCoordinateToSourceCoordinate(gene,coordinate) - 1);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class NonCanonicalSplitSiteService {
String acceptorSpliceSiteSequence = residues.substring(local1,local2)
acceptorSpliceSiteSequence=transcript.getStrand()==-1?acceptorSpliceSiteSequence.reverse():acceptorSpliceSiteSequence
log.debug "acceptor ${local1} ${local2} ${acceptorSpliceSiteSequence} ${acceptor}"
if(acceptorSpliceSiteSequence==acceptor)
if(acceptorSpliceSiteSequence.toLowerCase() == acceptor)
validThreePrimeSplice=true
else
threePrimeSpliceSitePosition = exon.getStrand() == -1 ? local1 : local2;
Expand All @@ -135,7 +135,7 @@ class NonCanonicalSplitSiteService {
String donorSpliceSiteSequence = residues.substring(local3,local4)
donorSpliceSiteSequence=transcript.getStrand()==-1?donorSpliceSiteSequence.reverse():donorSpliceSiteSequence
log.debug "donor ${local3} ${local4} ${donorSpliceSiteSequence} ${donor}"
if(donorSpliceSiteSequence==donor)
if(donorSpliceSiteSequence.toLowerCase() == donor)
validFivePrimeSplice=true
else
fivePrimeSpliceSitePosition = exon.getStrand() == -1 ? local3 : local4;
Expand Down