Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dom2BGC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
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
Tracanna, Vittorio
dom2BGC
Commits
f5687ff0
Commit
f5687ff0
authored
5 years ago
by
Tracanna, Vittorio
Browse files
Options
Downloads
Patches
Plain Diff
Replace amplicon_pipeline.py
parent
dbc89e05
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
amplicon_pipeline.py
+3
-3
3 additions, 3 deletions
amplicon_pipeline.py
with
3 additions
and
3 deletions
amplicon_pipeline.py
+
3
−
3
View file @
f5687ff0
...
...
@@ -16,6 +16,7 @@ import time
import
scipy
import
pandas
as
pd
import
matplotlib.pyplot
as
plt
import
matplotlib
import
seaborn
as
sns
import
scipy.stats
from
ete3
import
NCBITaxa
...
...
@@ -600,7 +601,6 @@ def beta_diversity_plot(normalized_df, argOptions):
for
s
in
samples
:
if
c
.
startswith
(
s
):
meta_df
.
loc
[
c
,
[
'
Sample
'
]]
=
s
fig
=
pcoa_results
.
plot
(
df
=
meta_df
,
column
=
'
Sample
'
,
cmap
=
'
Set1
'
,
s
=
50
)
plt
.
savefig
(
'
{}beta_diversity_pcoa.pdf
'
.
format
(
argOptions
[
'
outputDir
'
]))
plt
.
close
()
...
...
@@ -620,7 +620,7 @@ def beta_diversity_plot(normalized_df, argOptions):
for
target
,
color
in
zip
(
targets
,
sns
.
color_palette
(
"
husl
"
,
len
(
targets
))):
indicesToKeep
=
finalDf
[
'
Sample
'
]
==
target
ax
.
scatter
(
finalDf
.
loc
[
indicesToKeep
,
'
principal component 1
'
],
finalDf
.
loc
[
indicesToKeep
,
'
principal component 2
'
],
c
=
color
,
s
=
50
)
finalDf
.
loc
[
indicesToKeep
,
'
principal component 2
'
],
c
=
np
.
array
([
color
])
,
s
=
50
)
ax
.
legend
(
targets
)
ax
.
grid
()
plt
.
savefig
(
'
{}beta_div_pca.pdf
'
.
format
(
argOptions
[
'
outputDir
'
]))
...
...
@@ -636,7 +636,7 @@ def beta_diversity_plot(normalized_df, argOptions):
for
target
,
color
in
zip
(
targets
,
sns
.
color_palette
(
"
husl
"
,
len
(
targets
))):
indicesToKeep
=
finalDf
[
finalDf
[
'
Sample
'
]
==
target
]
for
i
in
indicesToKeep
.
index
:
ax
.
scatter
(
X_r
[
i
,
0
],
X_r
[
i
,
1
],
c
=
color
,
s
=
50
)
ax
.
scatter
(
X_r
[
i
,
0
],
X_r
[
i
,
1
],
c
=
np
.
array
([
color
])
,
s
=
50
)
ax
.
legend
(
targets
)
ax
.
grid
()
plt
.
savefig
(
'
{}beta_diversity_mds.pdf
'
.
format
(
argOptions
[
'
outputDir
'
]))
...
...
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