Skip to content

Commit

Permalink
Database builder update
Browse files Browse the repository at this point in the history
  • Loading branch information
mikessh committed Dec 17, 2014
1 parent 7805a05 commit ec9991f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dataprep/PrepareDatabaseNew.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import java.nio.file.Files

/**
Copyright 2014 Mikhail Shugay (mikhail.shugay@gmail.com)
Expand All @@ -24,6 +22,8 @@ new File("jref.txt").delete()
new File(inputFileName).splitEachLine("\t") {
def (species, geneFull, segment, segmentFull, refPoint, seq) = it

segmentFull = segmentFull.replaceAll("/", "_")

new File("$outputPath/${species}_${geneFull[0..1]}_${geneFull[2]}_${segment}.fa").withWriterAppend { writer ->
writer.println(">$segmentFull\n$seq")
}
Expand All @@ -36,5 +36,5 @@ new File(inputFileName).splitEachLine("\t") {
}

new File(outputPath).listFiles().each {
"makeblastdb -parse_seqids -dbtype nucl -in $outputPath/$it.name".execute()
"makeblastdb -parse_seqids -dbtype nucl -in $outputPath/$it.name -out $outputPath/${it.name[0..-4]}".execute()
}

0 comments on commit ec9991f

Please sign in to comment.