Skip to content

Commit

Permalink
cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed May 23, 2019
1 parent 5d363c1 commit 49fd083
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions grails-app/services/org/bbop/apollo/SequenceService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -266,19 +266,10 @@ class SequenceService {
}
}
// this will be automatically replaced correctly
// urlTemplate = urlTemplate.replaceAll("\\/seq\\/\\{refseq_dirpath\\}\\/\\{refseq\\}-", "")
// urlTemplate = urlTemplate.replaceAll("\\/seq\\/\\{refseq_dirpath\\}\\/\\{refseq\\}-", "")
urlTemplate = urlTemplate.replaceAll("\\{refseq\\}",sequence.name)
println "A $urlTemplate"
String seqPath = String.format("%s/%s/%s", dirs[0], dirs[1], dirs[2])
println "B $seqPath"
urlTemplate = urlTemplate.replaceAll("\\{refseq_dirpath\\}",seqPath)
println "C ${urlTemplate}"
// String seqDir = String.format("%s/seq/%s/%s/%s", urlTemplate, dirs[0], dirs[1], dirs[2]);
// String filePath = seqDir + "/" + sequence.name + "-" + chunkNumber + ".txt${isCompressed ? 'z' : ''}"
String filePath = urlTemplate + chunkNumber + ".txt${isCompressed ? 'z' : ''}"
println "D ${filePath}"

/**
* handle remote data
*/
Expand All @@ -293,13 +284,10 @@ class SequenceService {
}
}

println "E ${filePath}"
if(!filePath.startsWith("\\/")){
filePath = sequence.organism.directory + "/" + filePath
}
println "F ${filePath}"
File file = new File(filePath)
println "G ${file.exists()}"
if(file.exists()){
if (isCompressed) {
def inflaterStream = new GZIPInputStream(new ByteArrayInputStream(file.bytes))
Expand Down

0 comments on commit 49fd083

Please sign in to comment.