Skip to content

Commit

Permalink
renamed run column
Browse files Browse the repository at this point in the history
  • Loading branch information
farchaab committed Aug 2, 2024
1 parent b0485f3 commit a66778f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions zamp/rules/In_silico/scripts/abundance_to_mismatches.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ count_table_path <- snakemake@input[["count_table_path"]]
merged_mismatch_table_path <- snakemake@output[["merged_mismatch_table_path"]]

## Params
RUN <- snakemake@params["RUN"]
run <- snakemake@params["run"]

## Libraries
library(dplyr)
Expand All @@ -39,7 +39,7 @@ mismatches_table$Query.id <- str_remove(string = mismatches_table$Query.id, patt

merged_mismatch_table <- left_join(mismatches_table, count_table, by = c("Query.id"= "ID"))

merged_mismatch_table$RUN <- head(as.character(RUN))
merged_mismatch_table$run <- head(as.character(run))


write.table(x = merged_mismatch_table, file = merged_mismatch_table_path, sep = "\t", row.names = FALSE)
Expand Down
6 changes: 3 additions & 3 deletions zamp/rules/In_silico/scripts/compare_all_mismatches.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
# Merge data from multiple runs (if necessary)
# Merge data from multiple runs (if necessary)
if (length(mismatch_tables_path) == 1){
print("Unique RUN, no merging of seq_tabl")
print("Unique run, no merging of seq_tabl")
st.all <- readRDS(seq_tab)
}else{
print("Multiple RUN, merging")
print("Multiple run, merging")
st.all <- do.call("rbind", lapply(mismatch_tables_path, read.table, header = TRUE, sep = "\t"))
}

p <- ggplot(st.all, aes(x=Mismatches, fill=RUN, weight = Counts)) +
p <- ggplot(st.all, aes(x=Mismatches, fill=run, weight = Counts)) +
geom_histogram( color="black", binwidth=1, position = position_dodge2(padding = 0.3, preserve = "single")) +
theme_bw()

Expand Down
4 changes: 2 additions & 2 deletions zamp/rules/In_silico/scripts/compare_mismatches.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

# Merge data from multiple runs (if necessary)
if (length(mismatch_tables_path) == 1){
print("Unique RUN, no merging of seq_tabl")
print("Unique run, no merging of seq_tabl")
st.all <- readRDS(seq_tab)
}else{
print("Multiple RUN, merging")
print("Multiple run, merging")
st.all <- do.call("rbind", lapply(mismatch_tables_path, read.table, header = TRUE, sep = "\t", row.names = 1))
}

Expand Down

0 comments on commit a66778f

Please sign in to comment.