Skip to content

Commit 49c1fc0

Browse files
committed
properly parse bed6 (score & strand)
1 parent 4a910c1 commit 49c1fc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/filehandler.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ pub fn read_bedfile(bed_file: &String, metagene: bool, chroms: Vec<&String>) ->
273273
chrom: fields[0].to_string(), //chrom
274274
start: Revalue::U(start), //start
275275
end: Revalue::U(end), //end
276-
score: ".".to_string(), //score
277-
strand: ".".to_string(), //score
276+
score: fields[4].to_string(), //score
277+
strand: fields[5].to_string(), //strand
278278
name: entryname, //region name
279279
regionlength: end - start // regionlength
280280
}
@@ -321,7 +321,7 @@ pub fn read_bedfile(bed_file: &String, metagene: bool, chroms: Vec<&String>) ->
321321
start: Revalue::V(starts), //start
322322
end: Revalue::V(ends), //end
323323
score: fields[4].to_string(), //score
324-
strand: fields[5].to_string(), //score
324+
strand: fields[5].to_string(), //strand
325325
name: entryname, //region name
326326
regionlength: length // regionlength
327327
}
@@ -336,7 +336,7 @@ pub fn read_bedfile(bed_file: &String, metagene: bool, chroms: Vec<&String>) ->
336336
start: Revalue::U(start), //start
337337
end: Revalue::U(end), //end
338338
score: fields[4].to_string(), //score
339-
strand: fields[5].to_string(), //score
339+
strand: fields[5].to_string(), //strand
340340
name: entryname, //region name
341341
regionlength: end - start // regionlength
342342
}

0 commit comments

Comments
 (0)