Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
biopet.biopet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Mirrors
biopet.biopet
Commits
c3a9e217
Commit
c3a9e217
authored
Jan 25, 2017
by
Peter van 't Hof
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace ID with a file argument
parent
d36878da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
...c/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
+1
-1
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/DownloadNcbiAssembly.scala
...cala/nl/lumc/sasc/biopet/tools/DownloadNcbiAssembly.scala
+5
-5
biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/DownloadNcbiAssemblyTest.scala
.../nl/lumc/sasc/biopet/tools/DownloadNcbiAssemblyTest.scala
+1
-1
No files found.
biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/BiopetQScript.scala
View file @
c3a9e217
...
...
@@ -120,7 +120,7 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
val
className
=
if
(
f
.
getClass
.
isAnonymousClass
)
f
.
getClass
.
getSuperclass
.
getSimpleName
else
f
.
getClass
.
getSimpleName
BiopetQScript
.
safeOutputs
(
f
)
match
{
case
Some
(
o
)
=>
f
.
jobOutputFile
=
new
File
(
o
.
head
.
getAbsoluteFile
.
getParent
,
"."
+
f
.
firstOutput
.
getName
+
"."
+
className
+
".out"
)
case
_
=>
f
.
jobOutputFile
=
new
File
(
"./stdout"
)
// Line is here for test backup
case
_
=>
f
.
jobOutputFile
=
new
File
(
"./stdout"
)
// Line is here for test backup
}
})
...
...
biopet-tools/src/main/scala/nl/lumc/sasc/biopet/tools/DownloadNcbiAssembly.scala
View file @
c3a9e217
...
...
@@ -11,7 +11,7 @@ import scala.io.Source
*/
object
DownloadNcbiAssembly
extends
ToolCommand
{
case
class
Args
(
assembly
Id
:
String
=
null
,
case
class
Args
(
assembly
Report
:
File
=
null
,
outputFile
:
File
=
null
,
reportFile
:
Option
[
File
]
=
None
,
contigNameHeader
:
Option
[
String
]
=
None
,
...
...
@@ -19,8 +19,8 @@ object DownloadNcbiAssembly extends ToolCommand {
mustNotHave
:
List
[(
String
,
String
)]
=
List
())
extends
AbstractArgs
class
OptParser
extends
AbstractOptParser
{
opt
[
String
](
'a'
,
"assembly id
"
)
required
()
unbounded
()
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
assembly
Id
=
x
)
opt
[
File
](
'a'
,
"assembly_report
"
)
required
()
unbounded
()
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
assembly
Report
=
x
)
}
text
"refseq ID from NCBI"
opt
[
File
](
'o'
,
"output"
)
required
()
unbounded
()
valueName
"<file>"
action
{
(
x
,
c
)
=>
c
.
copy
(
outputFile
=
x
)
...
...
@@ -52,8 +52,8 @@ object DownloadNcbiAssembly extends ToolCommand {
val
argsParser
=
new
OptParser
val
cmdargs
:
Args
=
argsParser
.
parse
(
args
,
Args
())
getOrElse
(
throw
new
IllegalArgumentException
)
logger
.
info
(
s
"Reading ${cmdargs.assembly
Id} from NCBI
"
)
val
reader
=
Source
.
from
URL
(
s
"ftp://ftp.ncbi.nlm.nih.gov/genomes/ASSEMBLY_REPORTS/All/${cmdargs.assemblyId}.assembly.txt"
)
logger
.
info
(
s
"Reading ${cmdargs.assembly
Report}
"
)
val
reader
=
Source
.
from
File
(
cmdargs
.
assemblyReport
)
val
assamblyReport
=
reader
.
getLines
().
toList
reader
.
close
()
cmdargs
.
reportFile
.
foreach
{
file
=>
...
...
biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/DownloadNcbiAssemblyTest.scala
View file @
c3a9e217
...
...
@@ -23,7 +23,7 @@ class DownloadNcbiAssemblyTest extends TestNGSuite with Matchers {
val
outputReport
=
File
.
createTempFile
(
"test."
,
".report"
)
output
.
deleteOnExit
()
outputReport
.
deleteOnExit
()
DownloadNcbiAssembly
.
main
(
Array
(
"-a"
,
"GCF_000844745.1"
,
DownloadNcbiAssembly
.
main
(
Array
(
"-a"
,
new
File
(
resourcePath
(
"/GCF_000844745.1.report"
)).
getAbsolutePath
,
"-o"
,
output
.
getAbsolutePath
,
"--report"
,
outputReport
.
getAbsolutePath
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment