Skip to content

Commit e5ee392

Browse files
committed
fix cstring error
1 parent c48f084 commit e5ee392

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/strpkg/call.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ proc call_main*() =
8787
if not fileExists(args.bounds):
8888
quit "couldn't open bounds file"
8989

90-
if not open(ibam_dist, args.bam, fai=args.fasta, threads=0):
90+
if not open(ibam_dist, cstring(args.bam), fai=cstring(args.fasta), threads=0):
9191
quit "couldn't open bam"
9292

9393
var cram_opts = 8191 - SAM_RNAME.int - SAM_RGAUX.int - SAM_QUAL.int - SAM_SEQ.int
@@ -103,7 +103,7 @@ proc call_main*() =
103103
ibam_dist.close()
104104
ibam_dist = nil
105105
var ibam:Bam
106-
if not open(ibam, args.bam, fai=args.fasta, threads=0, index=true):
106+
if not open(ibam, cstring(args.bam), fai=cstring(args.fasta), threads=0, index=true):
107107
quit "couldn't open bam"
108108
cram_opts = 8191 - SAM_RGAUX.int - SAM_QUAL.int
109109
discard ibam.set_option(FormatOption.CRAM_OPT_REQUIRED_FIELDS, cram_opts)

src/strpkg/extract.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ proc extract_main*() =
272272
var min_mapq = uint8(parseInt(args.min_mapq))
273273
var skip_reads = 100000
274274

275-
if not open(ibam, args.bam, fai=args.fasta, threads=0):
275+
if not open(ibam, cstring(args.bam), fai=cstring(args.fasta), threads=0):
276276
quit "couldn't open bam"
277277

278278
var cram_opts = 8191 - SAM_RNAME.int - SAM_RGAUX.int - SAM_QUAL.int - SAM_SEQ.int
@@ -286,7 +286,7 @@ proc extract_main*() =
286286
stderr.write_line "10th, 90th percentile of fragment length:", $frag_dist.median(0.1), " ", $frag_dist.median(0.9)
287287

288288
ibam.close()
289-
if not open(ibam, args.bam, fai=args.fasta, threads=0, index=true):
289+
if not open(ibam, cstring(args.bam), fai=cstring(args.fasta), threads=0, index=true):
290290
quit "couldn't open bam"
291291
cram_opts = 8191 - SAM_RGAUX.int - SAM_QUAL.int
292292
discard ibam.set_option(FormatOption.CRAM_OPT_REQUIRED_FIELDS, cram_opts)

src/strpkg/extract_region.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ proc extract_region_main*() =
3737
quit 0
3838

3939
var ibam:Bam
40-
if not ibam.open(opts.bam, fai=opts.fasta, threads=3, index=true):
40+
if not ibam.open(cstring(opts.bam), fai=cstring(opts.fasta), threads=3, index=true):
4141
quit "could not open bam"
4242

4343
var records = newSeq[Record]()
@@ -69,7 +69,7 @@ proc extract_region_main*() =
6969

7070
var obam:Bam
7171

72-
if not obam.open(opts.output_bam, mode="wb", threads=2):
72+
if not obam.open(cstring(opts.output_bam), mode="wb", threads=2):
7373
quit "couldn't open output bam"
7474

7575
obam.write_header(ibam.hdr)

0 commit comments

Comments
 (0)