Skip to content

Commit b6b0a66

Browse files
Allow R as a tag length.
1 parent c7e88cd commit b6b0a66

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bcf/to_txt.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ pub fn to_txt(
129129
bcf::header::TagLength::AltAlleles => {
130130
Ok(i)
131131
},
132+
bcf::header::TagLength::Alleles => {
133+
Ok(i + 1)
134+
},
132135
bcf::header::TagLength::Variable => {
133136
Ok(i)
134137
},
@@ -196,6 +199,9 @@ pub fn to_txt(
196199
bcf::header::TagLength::AltAlleles => {
197200
i
198201
},
202+
bcf::header::TagLength::Alleles => {
203+
i + 1
204+
},
199205
_ => return Err(Box::new(ParseError::UnsupportedTagLength))
200206
};
201207

@@ -231,7 +237,7 @@ quick_error! {
231237
#[derive(Debug)]
232238
pub enum ParseError {
233239
UnsupportedTagLength {
234-
description("currently, only A and 1 are supported multiplicities of tags")
240+
description("currently, only R, A, and 1 are supported multiplicities of tags")
235241
}
236242

237243
}

0 commit comments

Comments
 (0)