Skip to content

Commit a999129

Browse files
committed
When infile is stdin, still read autosql file if specified
1 parent 5c4879e commit a999129

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

bigtools/src/utils/cli/bedtobigbed.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ pub fn bedtobigbed(args: BedToBigBedArgs) -> anyhow::Result<()> {
109109

110110
let allow_out_of_order_chroms = !matches!(outb.options.input_sort_type, InputSortType::ALL);
111111
if bedpath == "-" || bedpath == "stdin" {
112+
if let Some(file) = args.autosql.as_ref() {
113+
outb.autosql = Some(std::fs::read_to_string(file)?);
114+
}
112115
let stdin = std::io::stdin().lock();
113116
let data = BedParserStreamingIterator::from_bed_file(stdin, allow_out_of_order_chroms);
114117
outb.write(data, runtime)

0 commit comments

Comments
 (0)