Previous changeset 9:6171163112de (2018-01-28) Next changeset 11:4c7ab9995f9e (2018-04-07) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/diffbind commit f970dcbe9d0e4c3714b1db74c404ea34223cf8ed |
modified:
diffbind.R diffbind.xml |
added:
test-data/DiffBind_analysis.RData test-data/out_plots.pdf |
b |
diff -r 6171163112de -r d7725c5596ab diffbind.R --- a/diffbind.R Sun Jan 28 05:10:25 2018 -0500 +++ b/diffbind.R Tue Mar 20 04:51:25 2018 -0400 |
[ |
@@ -21,7 +21,8 @@ 'infile' , 'i', 1, "character", 'format', 'f', 1, "character", 'th', 't', 1, "double", - 'bmatrix', 'b', 0, "logical" + 'bmatrix', 'b', 0, "logical", + "rdaOpt", "r", 0, "logical" ), byrow=TRUE, ncol=4); opt = getopt(spec); @@ -43,6 +44,7 @@ sample_analyze = dba.analyze(sample_contrast) diff_bind = dba.report(sample_analyze) orvals = dba.plotHeatmap(sample_analyze, contrast=1, correlations=FALSE) +dev.off() resSorted <- diff_bind[order(diff_bind$FDR),] write.table(as.data.frame(resSorted), file = opt$outfile, sep="\t", quote = FALSE, append=TRUE, row.names = FALSE, col.names = FALSE) @@ -53,5 +55,10 @@ write.table(as.data.frame(bmat), file="bmatrix.tab", sep="\t", quote=FALSE, row.names=FALSE, col.names=FALSE) } -dev.off() +## Output RData file + +if (!is.null(opt$rdaOpt)) { + save.image(file = "DiffBind_analysis.RData") +} + sessionInfo() |
b |
diff -r 6171163112de -r d7725c5596ab diffbind.xml --- a/diffbind.xml Sun Jan 28 05:10:25 2018 -0500 +++ b/diffbind.xml Tue Mar 20 04:51:25 2018 -0400 |
[ |
b'@@ -1,10 +1,8 @@\n-<tool id="diffbind" name="DiffBind" version="2.6.5.0">\n+<tool id="diffbind" name="DiffBind" version="2.6.6.0">\n <description> differential binding analysis of ChIP-Seq peak data</description>\n <requirements>\n- <requirement type="package" version="2.6.5">bioconductor-diffbind</requirement>\n+ <requirement type="package" version="2.6.6">bioconductor-diffbind</requirement>\n <requirement type="package" version="1.20.0">r-getopt</requirement>\n- <!--added rmysql requirement to remove: "Warning: namespace \xe2\x80\x98RMySQL\xe2\x80\x99 is not available"-->\n- <requirement type="package" version="0.10.11">r-rmysql</requirement>\n </requirements>\n <stdio>\n <regex match="Execution halted"\n@@ -21,7 +19,7 @@\n description="An undefined error occured, please check your intput carefully and contact your administrator." />\n </stdio>\n <version_command><![CDATA[\n-echo $(R --version | grep version | grep -v GNU)", DiffBind version" $(R --vanilla --slave -e "library(DiffBind); cat(sessionInfo()\\$otherPkgs\\$DiffBind\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")," getopt version" $(R --vanilla --slave -e "library(getopt); cat(sessionInfo()\\$otherPkgs\\$getopt\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")", rmysql version" $(R --vanilla --slave -e "library(rmysql); cat(sessionInfo()\\$otherPkgs\\$rmysql\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")\n+echo $(R --version | grep version | grep -v GNU)", DiffBind version" $(R --vanilla --slave -e "library(DiffBind); cat(sessionInfo()\\$otherPkgs\\$DiffBind\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")\n ]]></version_command>\n <command><![CDATA[\n ## seems that diffbind also needs file extensions to work properly\n@@ -39,13 +37,17 @@\n Rscript \'$__tool_directory__/diffbind.R\'\n -i $infile\n -o \'$outfile\'\n+ -t $th\n+ -f $out.format\n -p \'$plots\'\n- -f $format\n- -t $th\n \n- #if $binding_affinity_matrix:\n+ #if $out.binding_matrix:\n -b\n #end if\n+\n+ #if $out.rdata:\n+ -r\n+ #end if\n ]]>\n </command>\n <configfiles>\n@@ -66,7 +68,7 @@\n #end for]]></configfile>\n </configfiles>\n <inputs>\n- <repeat name="samples" title="Samples" min="2">\n+ <repeat name="samples" title="Samples" min="4">\n <param name="sample_id" type="text" value="Sample ID" label="Specify a sample id" help="e.g. BT474.1-" />\n <param name="tissue" type="text" value="Tissue" label="Specify the tissue" help="e.g. BT474" />\n <param name="factor" type="text" value="Factor Name" label="Specify a factor name" help="e.g. ER" />\n@@ -79,32 +81,41 @@\n <param name="th" type="float" value="1" min="0" max="1"\n label="FDR Threshold"\n help="Significance threshold; all sites with FDR less than or equal to this value will be included in the report. A value of 1 will include all binding sites in the report. Default: 1"/>\n- <param name="pdf" type="boolean" truevalue="" falsevalue="" checked="true"\n- label="Visualising the analysis results"\n- help="output an additional PDF file" />\n- <param name="format" type="select" label="Output Format">\n- <option value="bed">BED</option>\n- <option value="gff">GFF</option>\n- <option value="wig">WIG</option>\n- </param>\n- <param name="binding_affinity_matrix" type="boolean" truevalue="True" falsevalue="" checked="False" label="Output binding affinity matrix?" help="Output a table of the binding scores" />\n+ \n+ <!-- Output Options -->\n+ <section name="out" expanded="false" title="Output Options">\n+ <param name="format" type="select" label="Output Format">\n+ <option value="bed">BED</option>\n+ <option value="gff">GFF</option>\n+ '..b'e testing corrected FDR p-value\n+* **1st**: Chromosome name\n+* **2nd**: Start position of site\n+* **3rd**: End position of site\n+* **4th**: Length of site\n+* **5th**: Strand\n+* **6th**: Mean read concentration over all the samples (the default calculation uses log2 normalized ChIP read counts with control read counts subtracted)\n+* **7th**: Mean concentration over the first (e.g. Resistant) group\n+* **8th**: Mean concentration over second (e.g. Responsive) group\n+* **9th**: Fold shows the difference in mean concentrations between the two groups (e.g. Resistant - Responsive), with a positive value indicating increased binding affinity in the first group and a negative value indicating increased binding affinity in the second group.\n+* **10th**: P-value confidence measure for identifying these sites as differentially bound\n+* **11th**: a multiple testing corrected FDR p-value\n \n \n **Binding Affinity Matrix**\n@@ -315,7 +323,7 @@\n ZR752 ZR75 ER Responsive Full-Media 2 counts 2845 0.22\n ====== ====== ====== ========== ========== ========= ====== ========= ====\n \n-\n+-----\n \n **More Information**\n \n@@ -328,21 +336,18 @@\n #. Plotting and reporting\n \n \n- * **Reading in peaksets**: \n+**Reading in peaksets**:\n \n The first step is to read in a set of peaksets and associated\n-metadata. Peaksets are derived either from ChIP-Seq peak callers, such as MACS\n-([1]), or using some other criterion (e.g. genomic windows, or all the promoter regions\n-in a genome). The easiest way to read in peaksets is using a comma-separated value\n-(csv) sample sheet with one line for each peakset. (Spreadsheets in Excel\xc2\xae format, with\n-a .xls or .xlsx suffix, are also accepted.) A single experiment can have more than\n+metadata. Peaksets are derived either from ChIP-Seq peak callers, such as **MACS2**, or using some other criterion (e.g. genomic windows, or all the promoter regions\n+in a genome). A single experiment can have more than\n one associated peakset; e.g. if multiple peak callers are used for comparison purposes\n each sample would have more than one line in the sample sheet. Once the peaksets\n are read in, a merging function finds all overlapping peaks and derives a single set of\n unique genomic intervals covering all the supplied peaks (a consensus peakset for the\n experiment).\n \n- * **Occupancy analysis**: \n+**Occupancy analysis**:\n \n Peaksets, especially those generated by peak callers, provide\n an insight into the potential occupancy of the protein being ChIPed for at specific\n@@ -356,7 +361,7 @@\n a consensus peakset, representing an overall set of candidate binding sites to be used\n in further analysis.\n \n- * **Counting reads**: \n+**Counting reads**:\n \n Once a consensus peakset has been derived, DiffBind can use the\n supplied sequence read files to count how many reads overlap each interval for each\n@@ -368,7 +373,7 @@\n data. The binding affinity matrix is used for QC plotting as well as for subsequent\n differential analysis.\n \n- * **Differential binding affinity analysis**: \n+**Differential binding affinity analysis**:\n \n The core functionality of DiffBind is the\n differential binding affinity analysis, which enables binding sites to be identified that\n@@ -378,7 +383,7 @@\n This will assign a p-value and FDR to each candidate binding site indicating confidence\n that they are differentially bound.\n \n- * **Plotting and reporting**: \n+**Plotting and reporting**:\n \n Once one or more contrasts have been run, DiffBind provides\n a number of functions for reporting and plotting the results. MA plots give an\n@@ -387,7 +392,9 @@\n of reads within differentially bound sites corresponding to whether they gain or\n lose affinity between the two sample groups. A reporting mechanism enables differentially\n bound sites to be extracted for further processing, such as annotation, motif, and\n-pathway analyses.\n+pathway analyses. *Note that currently only the correlation plot is implemented in this Galaxy tool.*\n+\n+-----\n \n **References**\n \n' |
b |
diff -r 6171163112de -r d7725c5596ab test-data/DiffBind_analysis.RData |
b |
Binary file test-data/DiffBind_analysis.RData has changed |
b |
diff -r 6171163112de -r d7725c5596ab test-data/out_plots.pdf |
b |
Binary file test-data/out_plots.pdf has changed |