Ejemplo n.º 1
0
def FastqToSam():
    """Write unaligned bam file"""
    options.order("FastqToSam", "picard_default")
    f1 = options.get("FASTQ", current_prefix(options.read_suffix + options.ext_fq))
    f2 = options.get("FASTQ2",read2())
    qv = options.get("QUALITY_FORMAT", "Standard")
    output = options.get("OUTPUT", None)
    sample_name = options.get("SAMPLE_NAME", get_prefix(f1)[0])
    opts = options.get("opts", "")
    if not output is None and not sample_name is None:
        opts += " FASTQ=%s FASTQ2=%s QUALITY_FORMAT=%s SAMPLE_NAME=%s OUTPUT=%s" % (f1, f2, qv, sample_name, output)
        cl = [" ".join(["java -jar", options.get("javamem"), path(options.get("picard_home")) / "FastqToSam.jar", opts])]
        run_cmd(cl, f1, output, options.get("run"), msg="Running FastqToSam")
    else:
        print >> sys.stderr, "required argument missing"
Ejemplo n.º 2
0
def read2():
    """Return read 2 if paired end"""
    retval = "none"
    if options.paired_end:
        retval = current_prefix(options.read2_suffix + options.ext_fq)
    return retval