Commit 4e936deb authored by Peter van 't Hof's avatar Peter van 't Hof

format fix

parent c906dc08
......@@ -2,13 +2,13 @@ package nl.lumc.sasc.biopet.extensions
import java.io.File
import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Version}
import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version }
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Input, Output}
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
/**
* Created by pjvanthof on 20/06/16.
*/
* Created by pjvanthof on 20/06/16.
*/
class GffRead(val root: Configurable) extends BiopetCommandLineFunction {
executable = config("exe", default = "gffread", freeVar = false)
......@@ -22,7 +22,7 @@ class GffRead(val root: Configurable) extends BiopetCommandLineFunction {
var T: Boolean = config("T", default = false, freeVar = false)
def cmdLine = executable +
(if(inputAsStdin) "" else required(input)) +
(if (inputAsStdin) "" else required(input)) +
(if (outputAsStsout) "" else required("-o", output)) +
conditional(T, "-T")
}
......@@ -2,15 +2,15 @@ package nl.lumc.sasc.biopet.extensions
import java.io.File
import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Version}
import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Version }
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Input, Output}
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
import scala.util.matching.Regex
/**
* Created by pjvanthof on 18/05/16.
*/
* Created by pjvanthof on 18/05/16.
*/
class Sed(val root: Configurable) extends BiopetCommandLineFunction with Version {
executable = config("exe", default = "sed", freeVar = false)
......
......@@ -18,7 +18,7 @@ import java.io.File
import nl.lumc.sasc.biopet.core.ToolCommandFunction
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Input, Output}
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
/**
* @deprecated Use picard.util.BedToIntervalList instead
......
package nl.lumc.sasc.biopet.tools
import java.io.{File, PrintWriter}
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.utils.ToolCommand
import scala.io.Source
/**
* Created by pjvan_thof on 21-9-16.
*/
* Created by pjvan_thof on 21-9-16.
*/
object DownloadNcbiAssembly extends ToolCommand {
case class Args(assemblyId: String = null,
......@@ -40,11 +40,11 @@ object DownloadNcbiAssembly extends ToolCommand {
}
/**
* @param args the command line arguments
*/
* @param args the command line arguments
*/
def main(args: Array[String]): Unit = {
val argsParser = new OptParser
val cmdargs: Args = argsParser.parse (args, Args () ) getOrElse (throw new IllegalArgumentException)
val cmdargs: Args = argsParser.parse(args, Args()) getOrElse (throw new IllegalArgumentException)
logger.info(s"Reading ${cmdargs.assemblyId} from NCBI")
val reader = Source.fromURL(s"ftp://ftp.ncbi.nlm.nih.gov/genomes/ASSEMBLY_REPORTS/All/${cmdargs.assemblyId}.assembly.txt")
......@@ -80,14 +80,14 @@ object DownloadNcbiAssembly extends ToolCommand {
filterLength.foreach(l => logger.info(s"Filtered length: ${l}"))
filterContigs.foreach { values =>
val id = if (values(6) == "na") values(4) else values(6)
logger.info(s"Start download ${id}")
val fastaReader = Source.fromURL(s"${baseUrlEutils}/efetch.fcgi?db=nuccore&id=${id}&retmode=text&rettype=fasta")
fastaReader.getLines()
.map(x => nameId.map(y => x.replace(">", s">${values(y)} ")).getOrElse(x))
.foreach(fastaWriter.println)
fastaReader.close()
}
val id = if (values(6) == "na") values(4) else values(6)
logger.info(s"Start download ${id}")
val fastaReader = Source.fromURL(s"${baseUrlEutils}/efetch.fcgi?db=nuccore&id=${id}&retmode=text&rettype=fasta")
fastaReader.getLines()
.map(x => nameId.map(y => x.replace(">", s">${values(y)} ")).getOrElse(x))
.foreach(fastaWriter.println)
fastaReader.close()
}
logger.info("Downloading complete")
......
package nl.lumc.sasc.biopet.pipelines.generateindexes
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import nl.lumc.sasc.biopet.extensions.bowtie.{Bowtie2Build, BowtieBuild}
import nl.lumc.sasc.biopet.extensions.{Ln, Star}
import nl.lumc.sasc.biopet.extensions.bowtie.{ Bowtie2Build, BowtieBuild }
import nl.lumc.sasc.biopet.extensions.{ Ln, Star }
import nl.lumc.sasc.biopet.extensions.bwa.BwaIndex
import nl.lumc.sasc.biopet.extensions.gmap.GmapBuild
import nl.lumc.sasc.biopet.extensions.hisat.Hisat2Build
......@@ -14,8 +14,8 @@ import org.broadinstitute.gatk.queue.QScript
import scala.collection.mutable.ListBuffer
/**
* Created by pjvan_thof on 21-9-16.
*/
* Created by pjvan_thof on 21-9-16.
*/
class GenerateIndexes(val root: Configurable) extends QScript with BiopetQScript {
def this() = this(null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment