Skip to content

Commit

Permalink
Merge pull request #40 from bioinformatics-ptp/issue-39
Browse files Browse the repository at this point in the history
👽 set guides(fill="none") in plot_InbreedingChr and plot_DistributionRuns
  • Loading branch information
filippob authored May 9, 2023
2 parents 1f821bc + 79b04a6 commit 466f55a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion detectRUNS/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Imports:
Rcpp,
gridExtra,
data.table
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
Suggests:
testthat,
knitr,
Expand Down
12 changes: 6 additions & 6 deletions detectRUNS/R/plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ plot_InbreedingChr<- function(runs, mapFile , groupSplit=TRUE, style=c("ChrBarPl
g1 <- g1 + scale_x_discrete(labels=list_chr)
g1 <- g1 + xlab("Inbreeding by Chromosome") + ylab("Froh")
if(!is.null(plotTitle)) { g1 <- g1 + ggtitle(mainTitle1) + theme(plot.title = element_text(hjust = 0.5)) }
if (groupSplit) { g1 <- g1 + facet_grid(group ~. ) + guides(fill=FALSE) } # if you want split or not!
if (groupSplit) { g1 <- g1 + facet_grid(group ~. ) + guides(fill="none") } # if you want split or not!
if (savePlots){ ggsave(filename = fileNameOutput1 , plot = g1, device = "pdf") } else { print(g1) }
}

Expand All @@ -795,7 +795,7 @@ plot_InbreedingChr<- function(runs, mapFile , groupSplit=TRUE, style=c("ChrBarPl
g2 <- g2 + scale_x_discrete(labels=list_chr)
g2 <- g2 + xlab("Inbreeding by Chromosome") + ylab("Froh")
if(!is.null(plotTitle)) { g2 <- g2 + ggtitle(mainTitle2) + theme(plot.title = element_text(hjust = 0.5)) }
if (groupSplit) { g2 <- g2 + facet_grid(group ~. ) + guides(fill=FALSE) } # if you want split or not!
if (groupSplit) { g2 <- g2 + facet_grid(group ~. ) + guides(fill="none") } # if you want split or not!
if (savePlots){ ggsave(filename = fileNameOutput2 , plot = g2, device = "pdf") } else { print(g2) }
}

Expand Down Expand Up @@ -949,7 +949,7 @@ plot_DistributionRuns <- function(runs, mapFile , groupSplit=TRUE, style=c("Mean
g1 <- g1 + geom_bar(stat="identity", position=position_dodge())
g1 <- g1 + xlab("Class Length Category") + ylab("Mean (Mb)") + scale_x_discrete(limits=unique(long_DF$chrom))
g1 <- g1 + ggtitle(mainTitle1) + theme(plot.title = element_text(hjust = 0.5))
if (groupSplit) { g1 <- g1 + facet_grid(group ~. ) + guides(fill=FALSE) } # if you want split or not!
if (groupSplit) { g1 <- g1 + facet_grid(group ~. ) + guides(fill="none") } # if you want split or not!
if (savePlots){ ggsave(filename = fileNameOutput1 , plot = g1, device = "pdf") } else { print(g1) }
}

Expand All @@ -962,7 +962,7 @@ plot_DistributionRuns <- function(runs, mapFile , groupSplit=TRUE, style=c("Mean
g2 <- g2 + geom_bar(stat="identity", position=position_dodge())
g2 <- g2 + xlab("Chromosome") + ylab("Mean (Mb)") + scale_x_discrete(limits=unique(long_DF$chrom))
g2 <- g2 + ggtitle(mainTitle2) + theme(plot.title = element_text(hjust = 0.5))
if (groupSplit) { g2 <- g2 + facet_grid(group ~. ) + guides(fill=FALSE) } # if you want split or not!
if (groupSplit) { g2 <- g2 + facet_grid(group ~. ) + guides(fill="none") } # if you want split or not!
if (savePlots){ ggsave(filename = fileNameOutput2 , plot = g2, device = "pdf") } else { print(g2) }
}

Expand All @@ -974,7 +974,7 @@ plot_DistributionRuns <- function(runs, mapFile , groupSplit=TRUE, style=c("Mean
g3 <- g3 + geom_bar(stat="identity", position=position_dodge()) + scale_x_discrete(limits=unique(long_DF$CLASS))
g3 <- g3 + xlab("Class Length Category") + ylab("Frequency")
g3 <- g3 + ggtitle(mainTitle3) + theme(plot.title = element_text(hjust = 0.5))
if (groupSplit) { g3 <- g3 + facet_grid(group ~. ) + guides(fill=FALSE) } # if you want split or not!
if (groupSplit) { g3 <- g3 + facet_grid(group ~. ) + guides(fill="none") } # if you want split or not!
if (savePlots){ ggsave(filename = fileNameOutput3 , plot = g3, device = "pdf") } else { print(g3) }
}

Expand All @@ -987,7 +987,7 @@ plot_DistributionRuns <- function(runs, mapFile , groupSplit=TRUE, style=c("Mean
g4 <- g4 + geom_bar(stat="identity", position=position_dodge()) + scale_x_discrete(limits=unique(long_DF$chrom))
g4 <- g4 + xlab("Chromosome") + ylab("Frequency")
g4 <- g4 + ggtitle(mainTitle4) + theme(plot.title = element_text(hjust = 0.5))
if (groupSplit) { g4 <- g4 + facet_grid(group ~. ) + guides(fill=FALSE) } # if you want split or not!
if (groupSplit) { g4 <- g4 + facet_grid(group ~. ) + guides(fill="none") } # if you want split or not!
if (savePlots){ ggsave(filename = fileNameOutput4 , plot = g4, device = "pdf") } else { print(g4) }
}
}
Expand Down
5 changes: 3 additions & 2 deletions detectRUNS/man/tableRuns.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions detectRUNS/src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// fast_factor
SEXP fast_factor(SEXP x);
RcppExport SEXP _detectRUNS_fast_factor(SEXP xSEXP) {
Expand Down

0 comments on commit 466f55a

Please sign in to comment.