Skip to content

Commit

Permalink
fix last local pathss
Browse files Browse the repository at this point in the history
  • Loading branch information
luisas committed Sep 8, 2023
1 parent c9b0c8c commit e24fc03
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 9 deletions.
4 changes: 2 additions & 2 deletions assets/samplesheet.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
id,fasta,reference,structures
seatoxin-ref,./test-dataset/setoxin-ref.fa,/home/luisasantus/Desktop/crg_cluster/projects/multiplesequencealign/test-dataset/setoxin.ref,/home/luisasantus/Desktop/crg_cluster/projects/multiplesequencealign/test-dataset/structures/setoxin-ref
toxin-ref,./test-dataset/toxin-ref.fa,/home/luisasantus/Desktop/crg_cluster/projects/multiplesequencealign/test-dataset/toxin.ref,
seatoxin-ref,./test-dataset/setoxin-ref.fa,./test-dataset/setoxin.ref,./test-dataset/structures/setoxin-ref
toxin-ref,./test-dataset/toxin-ref.fa,./test-dataset/toxin.ref,
39 changes: 32 additions & 7 deletions shiny_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
# Load file
# ----------------------------------------------------------------------------
summary_report = (
"/home/luisasantus/Desktop/crg_cluster/projects/nf-core-msa/outdir/summary_report/evaluation_summary_report.csv"
"./outdir/summary_report/evaluation_summary_report.csv"
)
stats_report = "/home/luisasantus/Desktop/crg_cluster/projects/nf-core-msa/outdir/stats/stats_summary_report.csv"
stats_report = "./outdir/stats/stats_summary_report.csv"

summary_df = pd.read_csv(summary_report)
stats_df = pd.read_csv(stats_report)
Expand All @@ -28,6 +28,8 @@
# ----------------------------------------------------------------------------

options = {item: item for item in list(inputfile.columns)}
options_color = {"align": "assembly", "tree": "tree"}
options_eval = {"sp": "sum of pairs (SP)", "n_sequences": "# sequences", "tc": "total column score (TC)", "perc_sim": "sequences avg similarity", "seq_length_mean": "sequence length (mean)"}

app_ui = ui.page_fluid(
ui.column(
Expand All @@ -45,7 +47,7 @@
"x",
"X axis: ",
{
"x axis": options,
"x axis": options_eval,
},
selected="n_sequences",
),
Expand All @@ -56,7 +58,7 @@
"y",
"Y axis: ",
{
"y axis": options,
"y axis": options_eval,
},
selected="sp",
),
Expand All @@ -67,11 +69,22 @@
"color",
"color: ",
{
"color": options,
"color": options_color,
},
selected="id",
selected="align",
),
),
ui.column(
4,
ui.input_numeric(
"size",
"dot's size: ",
min=1,
max=100,
step=10,
value=60),
),

),
ui.row(
ui.column(
Expand All @@ -87,7 +100,19 @@ def server(input, output, session):
def scatter():
plt.ylim(0, 100)
plt.xlim(0, 100)
ax = sns.scatterplot(data=inputfile, x=input.x(), y=input.y(), hue=input.color(), s=60)

x_label = options_eval[input.x()]
y_label = options_eval[input.y()]

ax = sns.scatterplot(data=inputfile,
x=input.x(),
y=input.y(),
hue=input.color(),
s=input.size())

ax.set_xlabel(x_label)
ax.set_ylabel(y_label)

plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.0)
return ax

Expand Down

0 comments on commit e24fc03

Please sign in to comment.