Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DIA augmentation
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Léo Schneider
DIA augmentation
Commits
5f801394
Commit
5f801394
authored
4 months ago
by
Schneider Leo
Browse files
Options
Downloads
Patches
Plain Diff
fix
parent
c819fbdb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
diann_lib_processing.py
+1
-1
1 addition, 1 deletion
diann_lib_processing.py
identification/result_extraction.py
+10
-4
10 additions, 4 deletions
identification/result_extraction.py
with
11 additions
and
5 deletions
diann_lib_processing.py
+
1
−
1
View file @
5f801394
...
...
@@ -95,7 +95,7 @@ def predict(data_pred, model, output_path):
if
__name__
==
'
__main__
'
:
df
=
load_lib
(
'
spectral_lib/first_lib.parquet
'
)
#
df = load_lib('spectral_lib/first_lib.parquet')
# plt.hist(df['RT'])
# plt.savefig('test.png')
...
...
This diff is collapsed.
Click to expand it.
identification/result_extraction.py
+
10
−
4
View file @
5f801394
...
...
@@ -3,7 +3,7 @@ import pandas as pd
from
matplotlib_venn
import
venn2
import
matplotlib.pyplot
as
plt
def
compare_id
(
path_1
,
path_2
):
def
compare_id
(
path_1
,
path_2
,
sample_name
):
df_1
=
pd
.
read_csv
(
path_1
,
sep
=
'
\t
'
,
encoding
=
'
latin-1
'
)
df_2
=
pd
.
read_csv
(
path_2
,
sep
=
'
\t
'
,
encoding
=
'
latin-1
'
)
peptides_1
=
set
(
df_1
[
'
Stripped.Sequence
'
].
tolist
())
...
...
@@ -11,7 +11,13 @@ def compare_id(path_1,path_2):
peptides_2
=
set
(
df_2
[
'
Stripped.Sequence
'
].
tolist
())
protein_2
=
set
(
df_2
[
'
Protein.Ids
'
].
tolist
())
venn2
((
peptides_1
,
peptides_2
),
(
'
custom lib
'
,
'
base lib
'
))
# venn2 works for two sets
plt
.
savefig
(
'
venn_diag.png
'
)
venn2
((
peptides_1
,
peptides_2
),
(
'
custom lib
'
,
'
base lib
'
),
set_colors
=
(
'
g
'
,
'
r
'
))
# venn2 works for two sets
plt
.
title
(
'
Peptide identifications on {} sample
'
.
format
(
sample_name
))
plt
.
savefig
(
'
venn_diag_pep_{}.png
'
.
format
(
sample_name
))
compare_id
(
'
CITFRE_ANA_69/report_custom.tsv
'
,
'
CITFRE_ANA_69/report_first_lib.tsv
'
)
plt
.
clf
()
venn2
((
protein_1
,
protein_2
),
(
'
custom lib
'
,
'
base lib
'
),
set_colors
=
(
'
g
'
,
'
r
'
))
# venn2 works for two sets
plt
.
title
(
'
Protein identifications on {} sample
'
.
format
(
sample_name
))
plt
.
savefig
(
'
venn_diag_prot_{}.png
'
.
format
(
sample_name
))
compare_id
(
'
CITFRE_ANA_69/report_custom.tsv
'
,
'
CITFRE_ANA_69/report_first_lib.tsv
'
,
sample_name
=
'
CITFRE_ANA_69
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment