Skip to content

Commit 85cf3b6

Browse files
committed
Merge branch 'model-extension'
2 parents 2bebaac + e0493df commit 85cf3b6

50 files changed

Lines changed: 4204 additions & 1922 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ directories = "6.0"
3434
flate2 = "1.0"
3535
iai-callgrind = "0.14"
3636
itertools = "0.14"
37-
mzdata = {version="0.48", default-features = false, features = ["miniz_oxide"]}
37+
mzdata = {version="0.49", default-features = false, features = ["miniz_oxide"]}
3838
ndarray = "0.16"
3939
ordered-float = { version = "4.6", features = ["serde"] }
4040
png = "0.17"

examples/ion-explorer/Cargo.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[package]
2+
name = "ion-explorer"
3+
version = "0.1.0"
4+
authors.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
publish = false
8+
9+
[dependencies]
10+
clap = { workspace = true }
11+
directories = { workspace = true }
12+
itertools = { workspace = true }
13+
mzdata = { workspace = true, features = ["mgf", "mzml", "thermo"] }
14+
rustyms = { path = "../../rustyms", default-features = false, features = [
15+
"mzdata",
16+
"identification",
17+
] }
18+
serde_json = { workspace = true }
19+
20+
[lints]
21+
workspace = true

examples/ion-explorer/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Ion explorer
2+
3+
```
4+
argo run -p ion-explorer --release -- --in-path /home/douwe/Downloads/raw_data/COVID19_IgG_14_DENOVO_5.csv --raw-file-directory /home/douwe/Downloads/raw_data/ --out-path .
5+
```
6+
7+
This takes an identified peptides file and extracts and bins all peaks surrounding the main fragment series. This helps in discovering which fragments and neutral losses are actually generated by the used fragmentation method. It returns a separate csv file for all fragments with the mz, count, and average intensity for all detected peaks.

examples/ion-explorer/figure.r

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
library(ggplot2)
2+
3+
for (file in c("start", "fragment_b", "fragment_y", "fragment_v_0", "fragment_w_0", "fragment_w_1", "fragment_w_2", "fragment_w_3", "fragment_w_4", "fragment_w_5", "fragment_w_6", "fragment_precursor")) {
4+
data = read.csv(paste(file, ".csv", sep=""), header=TRUE);
5+
# data = data[data$count > 1000,];
6+
7+
plot = ggplot(data, aes(x=mz, y=count, size=avg_intensity, colour=avg_intensity)) +
8+
geom_point() +
9+
scale_size_continuous(range = c(0.25, 3)) +
10+
xlab("Difference to theoretical ion") +
11+
theme_bw()
12+
13+
if (file == "fragment_y") {
14+
plot = plot + geom_vline(xintercept=0, linetype="dashed") + geom_vline(xintercept=+18.011-0.984, linetype="dashed") + geom_vline(xintercept=-25.979+18.011, linetype="dashed")
15+
}
16+
17+
ggsave(paste(file, ".png", sep=""), plot)
18+
}
19+
20+
for (file in c("comparison_b_N_N[U:Deamidated]", "comparison_y_N_N[U:Deamidated]")) {
21+
data = read.csv(paste(file, ".csv", sep=""), header=TRUE);
22+
data = data[data$count_a > 20 | data$count_b > 20,];
23+
max_a = max(data$avg_intensity_a);
24+
max_b = max(data$avg_intensity_b);
25+
26+
ggplot(data, aes(x=mz, y=log2(count_a/count_b), colour=rgb(avg_intensity_a / max_a, 0, avg_intensity_b / max_b), size=avg_intensity_a)) +
27+
geom_point() +
28+
scale_size_continuous(range = c(0.25, 3)) +
29+
theme_bw() +
30+
guides(colour="none")
31+
32+
ggsave(paste(file, ".png", sep=""))
33+
}

0 commit comments

Comments
 (0)