Skip to content

Commit

Permalink
Merge pull request #16 from danielecook/development
Browse files Browse the repository at this point in the history
fix fq_count var
  • Loading branch information
danielecook authored Oct 22, 2019
2 parents 642e4ee + 6fa3f67 commit cb398f8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ nimcache/
tut
ssshtest
.Rhistory
.python-version
.python-version
bam_set/
16 changes: 15 additions & 1 deletion sc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ import sequtils
import terminal
import asyncfile
import zip/gzipfiles

import src/fq_meta
import src/fq_count
import src/fq_dedup
#import src/index_swap
import src/vcf2tsv

import src/utils/helpers
from constants import ANN_header

Expand Down Expand Up @@ -336,6 +338,7 @@ var p = newParser("sc"):
arg("fastq", nargs = 1, help = "Input FASTQ")
run:
fq_dedup.fq_dedup(opts.fastq)

command("json", group="VCF"):
help("Convert a VCF to JSON")
arg("vcf", nargs = 1, help="VCF to convert to JSON")
Expand All @@ -351,6 +354,17 @@ var p = newParser("sc"):
flag("--debug", help="Debug")
run:
to_json(get_vcf(opts.vcf), opts.region, opts.samples, opts.info, opts.format, opts.zip, opts.annotation, opts.pretty, opts.array, opts.pass)

command("vcf2tsv", group="VCF"):
help("Converts a VCF to TSV or CSV")
flag("--header", help="Output the header")
arg("vcf", nargs = 1, help = "Input FASTQ")
run:
if opts.vcf.len == 0:
quit_error("No VCF specified", 3)
elif opts.vcf.len > 0:
vcf2tsv(opts.vcf)

command("fasta", group="VCF"):
help("Convert a VCF to a FASTA file")
arg("vcf", nargs = 1, help="VCF to convert to JSON")
Expand Down
12 changes: 7 additions & 5 deletions src/fq_count.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import strformat
import strutils
import os

const header* = ["reads",
"gc_content",
"gc_bases",
"bases",
"fname"].join("\t")
const fq_count_header* = ["reads",
"gc_content",
"gc_bases",
"n_bases",
"bases",
"basename",
"absolute_path"].join("\t")



Expand Down
10 changes: 10 additions & 0 deletions tasks.todo
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,14 @@ Index Swap:
☐ Minimum coverage level (10 reads)
☐ Group by flowcell/lane

BAM:
☐ BAM list chromoomes
☐ BAM window iterator
☐ Tajima's D (Parallelize across chrom?)

VCF:
☐ VCF list chromosome
☐ VCF window iterator
☐ VCF Subsample?

Genome manager (a better one?):

0 comments on commit cb398f8

Please # to comment.