Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change prefix behaviour #9

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
6 changes: 3 additions & 3 deletions R/Metalonda.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ metalonda = function(Count, Time, Group, ID, n.perm = 500, fit.method = "nbinomi
prefix = "Test")
{
cat("Start MetaLonDA \n")

if (!dir.exists(prefix)){
dir.create(file.path(prefix))
}
Expand Down Expand Up @@ -333,10 +333,10 @@ metalondaAll = function(Count, Time, Group, ID, n.perm = 500,
summary.tmp$dominant[which(summary.tmp$dominant == -1)] = gr.2

## Output table and figure that summarize the significant time intervals
write.csv(summary.tmp, file = sprintf("%s/%s_MetaLonDA_TimeIntervals.csv", prefix, prefix), row.names = FALSE)
write.csv(summary.tmp, file = sprintf("%s/MetaLonDA_TimeIntervals.csv", prefix), row.names = FALSE)
visualizeTimeIntervals(interval.details = summary.tmp, prefix, unit = time.unit, col = col)

aggregateData = list(output.detail = detailed, output.summary = summary.tmp, output.model = model)
save(aggregateData, file = sprintf("%s/%s_MetaLonDA.RData", prefix, prefix))
save(aggregateData, file = sprintf("%s/MetaLonDA.RData", prefix))
return(aggregateData)
}
2 changes: 1 addition & 1 deletion R/Visualization.R
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ visualizeTimeIntervals = function(interval.details, prefix = "Test", unit = "day
panel.grid.major.y = element_line(colour = "white", size = 6),
panel.grid.major.x = element_line(colour = "white",size = 0.75)) +
theme(legend.position="top", panel.border = element_rect(colour = "black", fill = NA, size = 2))
ggsave(filename = paste(prefix, "/", prefix, "_MetaLonDA_TimeIntervals.jpg", sep=""), dpi = 1200, height = 30, width = 20, units = 'cm')
ggsave(filename = paste(prefix, "/MetaLonDA_TimeIntervals.jpg", sep=""), dpi = 1200, height = 30, width = 20, units = 'cm')
}


Expand Down