Closed rkimoakbioinformatics closed 4 months ago
Since you're manipulating the record, you won't have access to the raw record line. You have to use record buffers (vcf::variant::RecordBuf
) and reserialize, e.g.,
main.rs
If you want to manipulate raw strings, you can get the underlying reader after reading the header and read lines from there, e.g.,
let mut reader = vcf::io::Reader::new(DATA);
let header = reader.read_header()?;
for result in reader.get_mut().lines() {
let line = result?;
// ...
}
Thanks. I'll try the suggestions.
Hi, I'm developing a program which reads each record, add some INFO fields to it, and write the record to a file. As it will write The original record line plus some, I need the original record line. Is there a way to access the raw record lines through lazy::Record?