File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 2424//! Several different output formats can be specified, here we provide parsers for two common output formats:
2525//! The BLAST+ outfmt 5 (an XML verbose format) and the outfmt 6 (the single line tabular format)
2626//!
27- //!```
27+ //!
2828//! Example to save a provided BLAST outfmt 6 single line tabular format into json
2929//!
30- //! ```rust
30+ //!```rust
3131//! use std::io::Write;
3232//! use tokio::io::BufReader as TokioBufReader;
33+ //! use std::io::Cursor;
34+ //! use microBioRust::blast::stream_outfmt6_to_json;
3335//!
3436//! async fn test_stream_tab_to_json() {
3537//! let data = "q1 h1 99.0 10 0 0 1 10 1 10 1e-5 50";
3840//! let res = stream_outfmt6_to_json(reader).await;
3941//! println!("results are {:?}", &res);
4042//! }
41- //!
43+ //!```
4244//! Example to create a completely new blast XML record
4345//!
4446//!```rust
4547//! use std::io::Write;
4648//! use tokio::io::BufReader as TokioBufReader;
49+ //! use std::io::Cursor;
50+ //! use microBioRust::blast::AsyncBlastXmlIter;
4751//!
4852//! async fn test_async_xml_iter_simple() {
4953//! let xml = r#"<?xml version="1.0"?>
8488//! assert_eq!(it.query_def.unwrap(), "My query");
8589//! assert_eq!(it.hits.len(), 1);
8690//! }
87- //!}
88- //!
8991//!
90- //! ```rust
9192//!```
9293
9394use anyhow:: { Context , Result } ;
You can’t perform that action at this time.
0 commit comments