Skip to content

Commit 2d240f5

Browse files
committed
add relative read pos plot in html
1 parent 3831c97 commit 2d240f5

File tree

7 files changed

+109
-57
lines changed

7 files changed

+109
-57
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Options:
5252
Use "nemo --help" for more information
5353
```
5454

55-
#### report page view
55+
## report page view
5656
![](example/report.jpeg)
5757

5858
#### ** any bugs please report issues **💖

example/report.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ <h1>Nemo Report Page</h1>
9393
</a>
9494
<div id="info">
9595
version: 0.1.0<br>
96-
report date: 2024-09-27 11:27:39
96+
report date: 2024-09-29 11:34:53
9797
</div>
9898
</div>
9999

@@ -114,9 +114,9 @@ <h2>Basic Statistics</h2>
114114
<!-- <p>This is the content for section 1.</p> -->
115115
<div id="Basic_Statistics" class="section">
116116
<div class="image-container">
117-
<div id="Basic_Statistics" class="plotly-graph-div" style="height:100%; width:100%;"></div>
118-
<script type="text/javascript">
119-
Plotly.newPlot("Basic_Statistics", {"data":[{"type":"table","header":{"values":["Measure","Value"],"align":"left","fill":{"color":"skyblue"},"font":{"size":16}},"cells":{"values":[["File name","Total reads count","Total bases count","Min read length","Max read length","Average read length","GC Content(%)","Base A count","Base T count","Base G count","Base C count","Base N count","\u003c1kb read info","\u003c2kb read info","\u003c5kb read info","\u003c10kb read info","\u003c20kb read info","\u003c50kb read info"],["longRreads.fq.gz","90","998386","272","43042","11093.18","51.09","245094","243222","257027","253043","0","5:(5.56%)","12:(13.33%)","28:(31.11%)","43:(47.78%)","78:(86.67%)","90:(100.00%)"]],"align":"left","fill":{"color":"whitesmoke"}}}],"layout":{"title":{"text":"\u003cb\u003eSequencing summary\u003c/b\u003e"},"autosize":false,"width":600,"height":650},"config":{}});
117+
<div id="Basic_Statistics" class="plotly-graph-div" style="height:100%; width:100%;"></div>
118+
<script type="text/javascript">
119+
Plotly.newPlot("Basic_Statistics", {"data":[{"type":"table","header":{"values":["Measure","Value"],"align":"left","fill":{"color":"skyblue"},"font":{"size":16}},"cells":{"values":[["File name","Total reads count","Total bases count","Min read length","Max read length","Average read length","GC Content(%)","Base A count","Base T count","Base G count","Base C count","Base N count","\u003c1kb read info","\u003c2kb read info","\u003c5kb read info","\u003c10kb read info","\u003c20kb read info","\u003c50kb read info"],["longRreads.fq.gz","90","998386","272","43042","11093.18","51.09","245094","243222","257027","253043","0","5:(5.56%)","12:(13.33%)","28:(31.11%)","43:(47.78%)","78:(86.67%)","90:(100.00%)"]],"align":"left","fill":{"color":"whitesmoke"}}}],"layout":{"title":{"text":"\u003cb\u003eSequencing summary\u003c/b\u003e"},"autosize":false,"width":600,"height":650},"config":{}});
120120
</script>
121121
</div>
122122
</div>
@@ -125,9 +125,9 @@ <h2>Read Length Count</h2>
125125
<!-- <p>This is the content for section 2.</p> -->
126126
<div id="Read_Length" class="section">
127127
<div class="image-container">
128-
<div id="Read_Length" class="plotly-graph-div" style="height:100%; width:100%;"></div>
129-
<script type="text/javascript">
130-
Plotly.newPlot("Read_Length", {"data":[{"type":"histogram","x":[272,397,442,533,580,1001,1341,1644,1657,1717,1857,1928,2516,2994,3190,3705,3765,3892,4057,4066,4365,4388,4413,4659,4695,4715,4893,4904,5081,5286,5504,6548,7280,7927,8184,8628,9082,9390,9439,9518,9599,9664,9680,10154,10210,10257,10613,10790,10836,10837,11019,11513,11795,12181,12523,12974,13118,13297,13900,14174,14318,14383,14742,15035,15103,15177,15199,15294,15351,15856,16116,16946,17005,17475,17587,17604,18029,18408,20404,20450,21373,21397,21689,23910,24293,24575,25346,30504,32188,43042],"y":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}],"layout":{"title":{"text":"\u003cb\u003eRead length distribution\u003c/b\u003e"},"autosize":false,"width":800,"height":600,"xaxis":{"title":{"text":"Read length"}},"yaxis":{"title":{"text":"Read count"}}},"config":{}});
128+
<div id="Read_Length" class="plotly-graph-div" style="height:100%; width:100%;"></div>
129+
<script type="text/javascript">
130+
Plotly.newPlot("Read_Length", {"data":[{"type":"histogram","x":[272,397,442,533,580,1001,1341,1644,1657,1717,1857,1928,2516,2994,3190,3705,3765,3892,4057,4066,4365,4388,4413,4659,4695,4715,4893,4904,5081,5286,5504,6548,7280,7927,8184,8628,9082,9390,9439,9518,9599,9664,9680,10154,10210,10257,10613,10790,10836,10837,11019,11513,11795,12181,12523,12974,13118,13297,13900,14174,14318,14383,14742,15035,15103,15177,15199,15294,15351,15856,16116,16946,17005,17475,17587,17604,18029,18408,20404,20450,21373,21397,21689,23910,24293,24575,25346,30504,32188,43042],"y":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}],"layout":{"title":{"text":"\u003cb\u003eRead length distribution\u003c/b\u003e"},"autosize":false,"width":800,"height":600,"xaxis":{"title":{"text":"Read length"}},"yaxis":{"title":{"text":"Read count"}}},"config":{}});
131131
</script>
132132
</div>
133133
</div>
@@ -136,9 +136,9 @@ <h2>Read GC Content</h2>
136136
<!-- <p>This is the content for section 3.</p> -->
137137
<div id="Read_GC_Content" class="section">
138138
<div class="image-container">
139-
<div id="Read_GC_Content" class="plotly-graph-div" style="height:100%; width:100%;"></div>
140-
<script type="text/javascript">
141-
Plotly.newPlot("Read_GC_Content", {"data":[{"type":"scatter","mode":"lines","x":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100],"y":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.11,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,3.33,0.0,1.11,3.33,5.56,6.67,13.33,21.11,15.56,14.44,6.67,3.33,2.22,0.0,1.11,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.11,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]}],"layout":{"title":{"text":"\u003cb\u003eRead GC content\u003c/b\u003e"},"autosize":false,"width":800,"height":600,"xaxis":{"title":{"text":"Per-Read gc content(%)"}},"yaxis":{"title":{"text":"Proportion(%)"}}},"config":{}});
139+
<div id="Read_GC_Content" class="plotly-graph-div" style="height:100%; width:100%;"></div>
140+
<script type="text/javascript">
141+
Plotly.newPlot("Read_GC_Content", {"data":[{"type":"scatter","mode":"lines","x":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100],"y":[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.11,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,3.33,0.0,1.11,3.33,5.56,6.67,13.33,21.11,15.56,14.44,6.67,3.33,2.22,0.0,1.11,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1.11,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0]}],"layout":{"title":{"text":"\u003cb\u003eRead GC content\u003c/b\u003e"},"autosize":false,"width":800,"height":600,"xaxis":{"title":{"text":"Per-Read gc content(%)"}},"yaxis":{"title":{"text":"Proportion(%)"}}},"config":{}});
142142
</script>
143143
</div>
144144
</div>
@@ -147,9 +147,9 @@ <h2>Cumulative fraction of bases</h2>
147147
<!-- <p>This is the content for section 3.</p> -->
148148
<div id="Cumulative_Base" class="section"></div>
149149
<div class="image-container">
150-
<div id="Cumulative_Base" class="plotly-graph-div" style="height:100%; width:100%;"></div>
151-
<script type="text/javascript">
152-
Plotly.newPlot("Cumulative_Base", {"data":[{"type":"scatter","mode":"lines","x":[0,272,397,442,533,580,1001,1341,1644,1657,1717,1857,1928,2516,2994,3190,3705,3765,3892,4057,4066,4365,4388,4413,4659,4695,4715,4893,4904,5081,5286,5504,6548,7280,7927,8184,8628,9082,9390,9439,9518,9599,9664,9680,10154,10210,10257,10613,10790,10836,10837,11019,11513,11795,12181,12523,12974,13118,13297,13900,14174,14318,14383,14742,15035,15103,15177,15199,15294,15351,15856,16116,16946,17005,17475,17587,17604,18029,18408,20404,20450,21373,21397,21689,23910,24293,24575,25346,30504,32188,43042],"y":[0.0,0.027243971770437483,0.06700815115596573,0.11127960528292664,0.16466577055367365,0.22275953388769476,0.32302135646934155,0.45733814376403514,0.6220039143177087,0.7879717864633519,0.9599493582642384,1.1459495625940266,1.3390612448491868,1.5910679837257333,1.8909519965223873,2.2104676948595032,2.581566648570793,2.9586753019373266,3.3485044862407927,3.754860344596178,4.16211765789985,4.599323307818819,5.0388326759389654,5.4808460855821295,5.9474992638117925,6.417758261834601,6.890020493075824,7.380111499960937,7.871304285116178,8.380225684254386,8.909680223881345,9.46097000558902,10.116828561297934,10.84600545280082,11.639986938919417,12.459709971894638,13.323904782318664,14.233572986800697,15.174090982846314,16.11951690027705,17.07285558892052,18.034307372098567,19.00226966323646,19.97183454094909,20.98887604593814,22.01152660393876,23.038884760002645,24.10190046735431,25.182644788688947,26.26799654642593,27.35344846582384,28.457129807509318,29.61029100968964,30.7916978002496,32.011766991924965,33.26609147163522,34.56558886042072,35.879509528378804,37.2113591336417,38.60360622043979,40.02329760233016,41.45741226339312,42.89803743241592,44.37462063770926,45.88055120965238,47.393292774538104,48.91344630233196,50.43580338666608,51.96767582878766,53.50525748558172,55.09342078114076,56.70762610853918,58.404965614501805,60.10821465845875,61.85853968304844,63.62008281366125,65.3833286925097,67.18914327724949,69.03291913147821,71.0766176609047,73.12492362673355,75.26567880559223,77.408837864313,79.58124412802263,81.97610944063719,84.40933666938439,86.87080948651122,89.40950694420795,92.46483824893377,95.68884179065012,100.0]}],"layout":{"title":{"text":"\u003cb\u003eCumulative fraction of bases\u003c/b\u003e"},"autosize":false,"width":800,"height":600,"xaxis":{"title":{"text":"Minimum read length(bp)"}},"yaxis":{"title":{"text":"Proportion(%)"}}},"config":{}});
150+
<div id="Cumulative_Base" class="plotly-graph-div" style="height:100%; width:100%;"></div>
151+
<script type="text/javascript">
152+
Plotly.newPlot("Cumulative_Base", {"data":[{"type":"scatter","mode":"lines","x":[0,272,397,442,533,580,1001,1341,1644,1657,1717,1857,1928,2516,2994,3190,3705,3765,3892,4057,4066,4365,4388,4413,4659,4695,4715,4893,4904,5081,5286,5504,6548,7280,7927,8184,8628,9082,9390,9439,9518,9599,9664,9680,10154,10210,10257,10613,10790,10836,10837,11019,11513,11795,12181,12523,12974,13118,13297,13900,14174,14318,14383,14742,15035,15103,15177,15199,15294,15351,15856,16116,16946,17005,17475,17587,17604,18029,18408,20404,20450,21373,21397,21689,23910,24293,24575,25346,30504,32188,43042],"y":[0.0,0.027243971770437483,0.06700815115596573,0.11127960528292664,0.16466577055367365,0.22275953388769476,0.32302135646934155,0.45733814376403514,0.6220039143177087,0.7879717864633519,0.9599493582642384,1.1459495625940266,1.3390612448491868,1.5910679837257333,1.8909519965223873,2.2104676948595032,2.581566648570793,2.9586753019373266,3.3485044862407927,3.754860344596178,4.16211765789985,4.599323307818819,5.0388326759389654,5.4808460855821295,5.9474992638117925,6.417758261834601,6.890020493075824,7.380111499960937,7.871304285116178,8.380225684254386,8.909680223881345,9.46097000558902,10.116828561297934,10.84600545280082,11.639986938919417,12.459709971894638,13.323904782318664,14.233572986800697,15.174090982846314,16.11951690027705,17.07285558892052,18.034307372098567,19.00226966323646,19.97183454094909,20.98887604593814,22.01152660393876,23.038884760002645,24.10190046735431,25.182644788688947,26.26799654642593,27.35344846582384,28.457129807509318,29.61029100968964,30.7916978002496,32.011766991924965,33.26609147163522,34.56558886042072,35.879509528378804,37.2113591336417,38.60360622043979,40.02329760233016,41.45741226339312,42.89803743241592,44.37462063770926,45.88055120965238,47.393292774538104,48.91344630233196,50.43580338666608,51.96767582878766,53.50525748558172,55.09342078114076,56.70762610853918,58.404965614501805,60.10821465845875,61.85853968304844,63.62008281366125,65.3833286925097,67.18914327724949,69.03291913147821,71.0766176609047,73.12492362673355,75.26567880559223,77.408837864313,79.58124412802263,81.97610944063719,84.40933666938439,86.87080948651122,89.40950694420795,92.46483824893377,95.68884179065012,100.0]}],"layout":{"title":{"text":"\u003cb\u003eCumulative fraction of bases\u003c/b\u003e"},"autosize":false,"width":800,"height":600,"xaxis":{"title":{"text":"Minimum read length(bp)"}},"yaxis":{"title":{"text":"Proportion(%)"}}},"config":{}});
153153
</script>
154154
</div>
155155
</div>

example/report.jpeg

-19.3 KB
Loading

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ fn main() -> Result<(), NemoError>{
2222
let start = Instant::now();
2323
info!("nemo version: {}",VERSION);
2424

25-
let (content, length_hash, gc_hash )= statfq(cmd.input, Some(&cmd.json), cmd.compression_level)?;
26-
summary(content, length_hash, gc_hash, &cmd.html, cmd_txt)?;
25+
let (content, length_hash, gc_hash, qual_relative_vec)= statfq(cmd.input, Some(&cmd.json), cmd.compression_level)?;
26+
summary(content, length_hash, gc_hash, qual_relative_vec, &cmd.html, cmd_txt)?;
2727

2828
info!("time elapsed is: {:?}", start.elapsed());
2929
Ok(())

src/process.rs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::{collections::HashMap, path::PathBuf};
22
use crate::{error::NemoError, utils::{file_reader, file_writer}};
33
use bio::io::fastq::Reader;
44
use serde::{Deserialize, Serialize};
5+
use log::error;
56

67
#[derive(Debug,Clone, Serialize,Deserialize)]
78
pub struct Rec {
@@ -53,7 +54,7 @@ pub fn statfq(
5354
file: Option<PathBuf>,
5455
json_file: Option<&str>,
5556
compression_level: u32,
56-
) -> Result<(Rec, HashMap<usize, usize>, HashMap<u64,u64>), NemoError> {
57+
) -> Result<(Rec, HashMap<usize, usize>, HashMap<u64,u64>, Vec<Vec<u8>>), NemoError> {
5758

5859
let file_name = file.clone();
5960
let mut info = Rec::new();
@@ -63,6 +64,7 @@ pub fn statfq(
6364
}
6465
let mut length_hash: HashMap<usize, usize> = HashMap::new();
6566
let mut gc_hash: HashMap<u64,u64> = HashMap::new();
67+
let mut qual_relative_vec: Vec<Vec<u8>> = vec![];
6668

6769
let reader = Reader::new(file_reader(file)?);
6870
for rec in reader.records().map_while(Result::ok) {
@@ -103,9 +105,21 @@ pub fn statfq(
103105
b'G' => info.nt_g += 1,
104106
b'C' => info.nt_c += 1,
105107
b'N' => info.nt_n += 1,
106-
_ => eprintln!("error base in read: {}",rec.id())
108+
_ => error!("error base in read: {}",rec.id())
107109
}
108110
}
111+
112+
let mut qual_relative_pos = vec![];
113+
for i in 1usize..=100 {
114+
let idx = if i == 100 { len -1 } else {
115+
let ret = (len as f64 * (i as f64/ 100 as f64) ) as usize;
116+
if ret == 0 { ret } else {ret -1 };
117+
ret
118+
};
119+
qual_relative_pos.push(rec.qual()[idx]);
120+
}
121+
qual_relative_vec.push(qual_relative_pos);
122+
109123
}
110124

111125
info.min_len = min_len.unwrap();
@@ -116,6 +130,6 @@ pub fn statfq(
116130
writer.write_all(str_json.as_bytes())?;
117131
writer.flush()?;
118132

119-
Ok((info,length_hash, gc_hash))
133+
Ok((info,length_hash, gc_hash, qual_relative_vec))
120134
}
121135

src/report.rs

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
use plotly::{
2-
Histogram, Layout, Plot, Scatter,
3-
common::{Font,Mode},
4-
layout::Axis,
5-
color::NamedColor,
6-
traces::table::{Cells, Header, Table, Fill}
2+
color::NamedColor, common::{Font,Mode}, layout::Axis, traces::table::{Cells, Fill, Header, Table}, Histogram, Layout, Plot, Scatter
73
};
84
use askama::Template;
95
use crate::error::NemoError;
@@ -22,6 +18,7 @@ struct Report {
2218
read_length_hist: String,
2319
per_read_gc: String,
2420
cumu_base: String,
21+
relative_pos_read: String,
2522
cmd: String,
2623
}
2724

@@ -30,13 +27,15 @@ pub fn summary(
3027
data: Rec,
3128
length_hash: HashMap<usize,usize>,
3229
gc_hash: HashMap<u64,u64>,
30+
qual_relative_vec: Vec<Vec<u8>>,
3331
html: &str,
3432
cmd_txt: String,
3533
) -> Result<(), NemoError> {
3634

3735
let tb1_div = basic_statistics(data.clone())?;
3836
let (cumu_plot_div, length_plot_div) = length_plot(length_hash, data.bases)?;
3937
let gc_plot_div = gc_plot(gc_hash)?;
38+
let qual_relative_div = relavte_qual(qual_relative_vec)?;
4039

4140
let mut writer = file_writer(Some(html), 0u32)?;
4241
let now: DateTime<Local> = Local::now();
@@ -48,6 +47,7 @@ pub fn summary(
4847
read_length_hist: length_plot_div,
4948
per_read_gc: gc_plot_div,
5049
cumu_base: cumu_plot_div,
50+
relative_pos_read: qual_relative_div,
5151
cmd: cmd_txt,
5252
};
5353
writer.write_all(report.to_string().as_bytes())?;
@@ -183,3 +183,52 @@ fn gc_plot(
183183
Ok(plot_div)
184184
}
185185

186+
fn relavte_qual(
187+
data: Vec<Vec<u8>>,
188+
) -> Result<String, NemoError> {
189+
let mut total_error: Vec<f64> = vec![0.;100];
190+
let read_count = data.len() as f64;
191+
// let mut qual_max: Vec<u8> = vec![0; 100];
192+
// let mut qual_min: Vec<u8> = vec![255;100];
193+
for row in data.iter() {
194+
for (idx,qual) in row.iter().enumerate() {
195+
total_error[idx] += qual_error(qual);
196+
// if *qual > qual_max[idx] {
197+
// qual_max[idx] = *qual - 33 ;
198+
// }
199+
// if *qual < qual_min[idx] {
200+
// qual_min[idx] = *qual - 33;
201+
// }
202+
}
203+
}
204+
let mut qual_mean = total_error.iter().map(|e| -10.0 * (e / read_count).log10()).collect::<Vec<f64>>();
205+
qual_mean.insert(0, 0.0);
206+
let data_x = (0..=100).into_iter().collect::<Vec<u32>>();
207+
// qual_max.insert(0, 0);
208+
// qual_min.insert(0, 0);
209+
210+
211+
let mut plot = Plot::new();
212+
let relative_plot = Scatter::new(data_x.clone(), qual_mean).mode(Mode::Lines).name("Mean");
213+
plot.add_trace(relative_plot);
214+
// let q_max = Scatter::new(data_x.clone(), qual_max).mode(Mode::Lines).name("MAX");
215+
// plot.add_trace(q_max);
216+
// let q_min = Scatter::new(data_x, qual_min).mode(Mode::Lines).name("MIN");
217+
// plot.add_trace(q_min);
218+
219+
plot.set_layout(Layout::new()
220+
.title("<b>Base quality in relative position</b>")
221+
.x_axis(Axis::new().title("Relative position in read(%)"))
222+
.y_axis(Axis::new().title("Mean base quality"))
223+
.auto_size(false)
224+
.width(800)
225+
.height(600)
226+
);
227+
let plot_div = plot.to_inline_html(Some("Relative_pos_in_read"));
228+
229+
Ok(plot_div)
230+
}
231+
232+
fn qual_error(qual: &u8) -> f64 {
233+
10.0f64.powf((qual - 33) as f64 / -10.0)
234+
}

0 commit comments

Comments
 (0)