Mercurial > repos > mingchen0919 > aurora_freebayes
changeset 1:ff16dd0da40f draft
update
author | mingchen0919 |
---|---|
date | Wed, 10 Oct 2018 13:31:01 -0400 |
parents | ad00a91641f0 |
children | 028bf09c12d0 |
files | galaxy_outputs.sh getopt.csv job_scripts.sh rmarkdown_report.Rmd rmarkdown_report.sh rmarkdown_report.xml |
diffstat | 6 files changed, 74 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/galaxy_outputs.sh Wed Oct 10 09:29:09 2018 -0400 +++ b/galaxy_outputs.sh Wed Oct 10 13:31:01 2018 -0400 @@ -9,3 +9,8 @@ if [ -e "index.html" ]; then cp index.html ${REPORT} fi + +if [ -e "var.vcf" ]; then + cp var.vcf ${X_v} +fi +
--- a/getopt.csv Wed Oct 10 09:29:09 2018 -0400 +++ b/getopt.csv Wed Oct 10 13:31:01 2018 -0400 @@ -1,9 +1,11 @@ -short flag,argument mask,data type,variable name -o,1,character,report -d,1,character,report.files_path -f,1,character,input.reference_genome -s,1,character,input.sample -r,1,character,input.region -t,1,character,input.target -N,1,character,population_model.theta -p,1,character,population_model.ploidy \ No newline at end of file +short flag,argument mask,data type,variable name +o,1,character,report +d,1,character,report.files_path +f,1,character,input.reference_genome +b,1,character,input.bam_file +s,2,character,input.samples_file +t,2,character,input.targets_file +r,2,character,input.region +T,1,character,population_model.theta +v,1,character,vcf_file +p,1,character,population_model.ploidy
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/job_scripts.sh Wed Oct 10 13:31:01 2018 -0400 @@ -0,0 +1,18 @@ +# run job scripts within the tool outputs directory +cd ${REPORT_FILES_PATH} + +#========== freebayes.sh ============ +cat >temp.sh <<EOF +freebayes \\ + -f ${X_f} \\ + -s ${X_s} \\ + -t ${X_t} \\ + -r ${X_r} \\ + -T ${X_T} \\ + -p ${X_p} \\ + ${X_b} > var.vcf + +EOF + +grep -v "None" temp.sh > freebayes.sh +rm temp.sh && sh freebayes.sh \ No newline at end of file
--- a/rmarkdown_report.Rmd Wed Oct 10 09:29:09 2018 -0400 +++ b/rmarkdown_report.Rmd Wed Oct 10 13:31:01 2018 -0400 @@ -1,5 +1,5 @@ --- -title: 'Aurora Tool Report' +title: 'FreeBayes Report' output: html_document: highlight: pygments @@ -53,5 +53,22 @@ # ADD YOUR DATA ANALYSIS CODE AND MARKUP TEXT BELOW TO EXTEND THIS R MARKDOWN FILE --- +```{r echo=FALSE} +if (opt$X_r == "") { + opt$X_r = "None" + Sys.setenv(X_r = "None") +} +``` +```{bash echo=FALSE} +sh ${TOOL_INSTALL_DIR}/job_scripts.sh > ${REPORT_FILES_PATH}/freebayes.log.txt 2>&1 +``` +## Run FreeBayes + +```{r echo=FALSE, comment='', results='asis'} +cat('```bash\n') +cat(readLines(paste0(Sys.getenv('REPORT_FILES_PATH'), '/freebayes.sh')), sep = '\n') +cat('\n```') +``` +
--- a/rmarkdown_report.sh Wed Oct 10 09:29:09 2018 -0400 +++ b/rmarkdown_report.sh Wed Oct 10 13:31:01 2018 -0400 @@ -19,9 +19,13 @@ -d $report.files_path -f '$input.reference_genome' - -s '$input.sample' + -b '$input.bam_file' + -s '$input.samples_file' + -t '$input.targets_file' -r '$input.region' - -t '$input.target' + - -N '$population_model.theta' + -T '$population_model.theta' -p '$population_model.ploidy' + + -v '$vcf_file'
--- a/rmarkdown_report.xml Wed Oct 10 09:29:09 2018 -0400 +++ b/rmarkdown_report.xml Wed Oct 10 13:31:01 2018 -0400 @@ -23,17 +23,21 @@ -d $report.files_path -f '$input.reference_genome' - -s '$input.sample' + -b '$input.bam_file' + -s '$input.samples_file' + -t '$input.targets_file' -r '$input.region' - -t '$input.target' + - -N '$population_model.theta' + -T '$population_model.theta' -p '$population_model.ploidy' + + -v '$vcf_file' ]]></command> <inputs> - <section name="input_section" title="Input Section" expanded="True"><param type="data" name="reference_genome" argument="-f" label="Reference Genome" help="Use FILE as the reference sequence for analysis. An index file (FILE.fai) will be created if none exists. If neither --targets nor --region are specified, FreeBayes will analyze every position in this reference." optional="False" format="fasta" multiple="False"/><param type="data" name="bam_file" label="BAM file" optional="False" multiple="False"/><param type="data" name="samples_file" argument="-s" label="Samples file" help="Limit analysis to samples listed (one per line) in the FILE. By default FreeBayes will analyze all samples in its input BAM files." optional="False" multiple="False"/><param type="data" name="targets_file" argument="-t" label="Targets file" help="Limit analysis to targets listed in the BED-format FILE." optional="False"/><param type="text" name="region" argument="-r" label="Region (<chrom>:<start_position>-<end_position>)" help="Limit analysis to the specified region, 0-base coordinates, end_position not included (same as BED format). Either '-' or '..' maybe used as a separator." optional="False"/></section><section name="population_model" title="Population model" expanded="True"><param type="float" name="theta" argument="-T" label="Theta" help="The expected mutation rate or pairwise nucleotide diversity among the population under analysis. This serves as the single parameter to the Ewens Sampling Formula prior model default: 0.001" optional="False" value="0.001"/><param type="integer" name="ploidy" argument="-p" label="Ploidy" help="Sets the default ploidy for the analysis to N. default: 2" optional="False" value="2"/></section></inputs> + <section name="input" title="Input" expanded="True"><param type="data" name="reference_genome" argument="-f" label="Reference Genome" help="Use FILE as the reference sequence for analysis. An index file (FILE.fai) will be created if none exists. If neither --targets nor --region are specified, FreeBayes will analyze every position in this reference." optional="False" format="fasta,fa" multiple="False"/><param type="data" name="bam_file" label="BAM file" optional="False" multiple="False"/><param type="data" name="samples_file" argument="-s" label="Samples file" help="Limit analysis to samples listed (one per line) in the FILE. By default FreeBayes will analyze all samples in its input BAM files." optional="True" format="txt" multiple="False"/><param type="data" name="targets_file" argument="-t" label="Targets file" help="Limit analysis to targets listed in the BED-format FILE." optional="True" format="bed"/><param type="text" name="region" argument="-r" label="Region (<chrom>:<start_position>-<end_position>)" help="Limit analysis to the specified region, 0-base coordinates, end_position not included (same as BED format). Either '-' or '..' maybe used as a separator." optional="True"/></section><section name="population_model" title="Population model" expanded="True"><param type="float" name="theta" argument="-T" label="Theta" help="The expected mutation rate or pairwise nucleotide diversity among the population under analysis. This serves as the single parameter to the Ewens Sampling Formula prior model default: 0.001" optional="False" value="0.001"/><param type="integer" name="ploidy" argument="-p" label="Ploidy" help="Sets the default ploidy for the analysis to N. default: 2" optional="False" value="2"/></section></inputs> <outputs> - <data format="html" name="report" label="${tool.name} report on ${on_string}"/></outputs> + <data format="html" name="report" label="${tool.name} report on ${on_string}"/><data name="vcf_file" format="vcf" label="${tool.name} VCF on ${on_string}" hidden="false"/></outputs> <citations> <citation type="bibtex"><![CDATA[ @article{allaire2016rmarkdown, @@ -58,5 +62,10 @@ year = 2018, url = {https://www.jstree.com/} } - ]]></citation></citations> + ]]></citation><citation type="bibtex"><![CDATA[@article{garrison2012haplotype, + title={Haplotype-based variant detection from short-read sequencing}, + author={Garrison, Erik and Marth, Gabor}, + journal={arXiv preprint arXiv:1207.3907}, + year={2012} +}]]></citation></citations> </tool>