| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 148a653 commit dd5059f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,14 +46,16 @@ async fn main() -> Result<()> { | |||
| 46 | 46 | )?; | |
| 47 | 47 | let mut highlight = opt.highlight.as_ref().cloned().unwrap_or_default(); | |
| 48 | 48 | if let Some(vcf_path) = opt.vcf.as_ref() { | |
| 49 | - let index = PathBuf::from(&format!("{}.csi", vcf_path.display())); | ||
| 50 | - if index.exists() { | ||
| 49 | + let csi_index = PathBuf::from(&format!("{}.csi", vcf_path.display())); | ||
| 50 | + let tbi_index = PathBuf::from(&format!("{}.tbi", vcf_path.display())); | ||
| 51 | + if csi_index.exists() || tbi_index.exists() { | ||
| 51 | 52 | highlight.extend(VcfHighlight::new(vcf_path.clone()).intervals(region)?); | |
| 52 | 53 | } else { | |
| 53 | 54 | bail!( | |
| 54 | - "VCF/BCF index not found: {}. Please create an index using `bcftools index {}`", | ||
| 55 | - index.display(), | ||
| 56 | - vcf_path.display() | ||
| 55 | + "VCF/BCF index not found: {csi} or {tbi}. Please create an index using `bcftools index {vcf}` or `tabix {vcf}`.", | ||
| 56 | + csi = csi_index.display(), | ||
| 57 | + tbi = tbi_index.display(), | ||
| 58 | + vcf = vcf_path.display() | ||
| 57 | 59 | ); | |
| 58 | 60 | } | |
| 59 | 61 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments