Previous changeset 77:c7e8fdb9f1db (2020-01-26) Next changeset 79:f5e42a101f12 (2020-01-26) |
Commit message:
Uploaded Analysis Pipeline |
added:
minfi_analysis.xml |
b |
diff -r c7e8fdb9f1db -r e67f424d3f42 minfi_analysis.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/minfi_analysis.xml Sun Jan 26 16:55:54 2020 -0500 |
[ |
b'@@ -0,0 +1,200 @@\n+<tool id="minfi_analysis" name="Infinium Human Methylation BeadChip" version="2.1.0">\n+ <description>Determines differentially methylated regions and positions from idat files</description>\n+ <macros>\n+ <import>macros.xml</import>\n+ </macros>\n+ <expand macro="requirements">\n+ <requirement type="package" version="0.6.0">bioconductor-illuminahumanmethylation450kanno.ilmn12.hg19</requirement>\n+ </expand>\n+ <command detect_errors="exit_code"><![CDATA[\n+ #for $counter, $input in enumerate($files_red):\n+ #set $redname = str( getattr( $input, \'element_identifier\', \'sample\' ) ).replace( "/", \'-\' ).replace( "\\t", "-" )\n+ ln -s $input ./${redname} &&\n+ #end for\n+ #for $counter, $input in enumerate($files_grn):\n+ #set $grnname = str( getattr( $input, \'element_identifier\', \'sample\' ) ).replace( "/", \'-\' ).replace( "\\t", "-" )\n+ ln -s $input ./${grnname} &&\n+ #end for\n+ Rscript \'$minfi_analysis_script\'\n+ ]]></command>\n+ <configfiles>\n+ <configfile name="minfi_analysis_script"><![CDATA[\n+\trequire("minfi", quietly = TRUE)\n+\trequire("IlluminaHumanMethylation27kanno.ilmn12.hg19", quietly = TRUE)\n+\trequire("IlluminaHumanMethylation450kanno.ilmn12.hg19", quietly = TRUE)\n+ require("IlluminaHumanMethylationEPICanno.ilm10b4.hg19", quietly = TRUE)\n+\toptions(warn = -1)\n+\tRGSet <- read.metharray(list.files(pattern="_Red.idat")) #load .IDAT files\n+\n+\tMSet <- preprocessRaw(RGSet) #create objects contains CpGs signals\n+\n+ qc <- getQC(MSet)\n+ write.table(qc, \'$qctab\') #optional - provides a simple quality control matrix and plot\n+ png(\'$qcpng\')\n+ plotQC(qc)\n+\tdev.off()\n+\n+\tRSet <- ratioConvert(MSet, what = "both", keepCN = TRUE) #store Beta values and/or M values\n+\tGRSet <- mapToGenome(RSet)\n+\n+\n+\tif (\'$optpp\' == "na" ) {\n+\tGRSet <- mapToGenome(RSet) #mapping Ilumina methylation array data to the genome\n+\t} else if (\'$optpp\' == "ppfun" ) {\n+\tGRSet <- preprocessFunnorm(RGSet) #optional - implements the functional normalization algorithm\n+\t} else if (\'$optpp\' == "ppq" ) {\n+\tGRSet <- preprocessQuantile(RGSet, fixOutliers = TRUE,\n+ removeBadSamples = TRUE, badSampleCutoff = 10.5,\n+ quantileNormalize = TRUE, stratified = TRUE,\n+ mergeManifest = FALSE, sex = NULL) #optional - implements stratified quantile normalization preprocessing\n+\t} else if (\'$optpp\' == "ppsnp" ) {\n+\tsnps <- getSnpInfo(GRSet) #optional - retrieve the chromosome and the position of each SNP\n+\twrite.table(snps, \'$table\')\n+\tGRSet <- dropLociWithSnps(GRSet, snps=c("SBE","CpG"), maf=0) #optional - drop the probes that contain either a SNP at the CpG interrogation or at the single nucleotide extensions\n+\t}\n+\tpheno <- read.table(\'$phenotype_table\',skip = 1)\n+ group <- pheno\\$V2\n+ pair <- factor(pheno\\$V3)\n+\t\n+\tdesign.matrix <- model.matrix(~ group + pair)\n+\t\n+\tmaxGap <- as.numeric(\'$maxgap_size\')\n+ if(is.null(GRSet\\$cluster)){\n+ cluster = NULL\n+ maxGap = maxGap\n+ } else {\n+ cluster = GRSet\\$cluster\n+ maxGap = NULL\n+ }\n+ \n+ dmrs <- bumphunter(GRSet,\n+ design = design.matrix, \n+ cluster = cluster,\n+ maxGap = maxGap,\n+ cutoff = as.numeric(\'$cutoff_size\'), \n+ nullMethod = \'$null_method\',\n+ B = as.numeric(\'$number_of_resamples\'))\n+ dmrGR <- dmrs\\$table[,c(1,2,3)] \n+ colnames(dmrGR) <- c("chr","start","end")\n+\twrite.table(dmrGR, file= \'$dmr\', quote = FALSE,col.names = TRUE, row.names = FALSE, sep = "\\t")\n+ \n+ tab <- read.table(\'$ucsc_genome\')\n+ tab <- tab[,-(11:14),drop=FALSE]\n+ tab <- tab[,c(1,4,5,10)]\n+ colnames(tab) <- c(\'chr\',\'start\',\'end\',\'names\')\n+\n+ dmp <- dmpFinder(dat = getBeta(GRSet),pheno = read.table(\'$phenotype_table\',skip=1)[,"V2"], type = \'$phenotype\', qCutoff = as.numeric(\'$q_cutoff\'), shrinkVar = \'$variance_shrinkage\')\n+ dmp[,"names"] <- '..b'0"/>\n+ <param name="cutoff_size" value="0.1"/>\n+ <param name="number_of_resamples" value="0"/>\n+\t\t<param name="null_method" value="permutation"/>\n+\t\t<param name="grset" value="GRSet_without_SNPs.rdata"/>\n+ <param name="phenotype_table" value="phenotypeTable.txt"/>\n+ <param name="phenotype" value="categorical"/>\n+ <param name="q_cutoff" value="1"/>\n+ <param name="variance_shrinkage" value="FALSE"/>\n+ <param name="ucsc_genome" value="ucsc.gtf"/>\n+\t\t<output name="qctab" file="Quality_Control_Report.txt"/>\n+\t\t<output name="qcpng" file="Quality_Control_Plot.png" compare="sim_size"/>\n+\t\t<output name="table" file="SNPInfo_Table.txt"/>\n+\t\t<output name="dmr" file="Differentially_Methylated_Regions.bed"/>\n+\t\t<output name="dmp" file="Differentially_Methylated_Positions.bed"/>\n+ </test>\n+ </tests>\n+<help><![CDATA[\n+\n+.. class:: infomark\n+\t\n+**What it does**\n+\n+The workflow combines 5 main steps, starting with raw intensity data loading (.idat) and then optional preprocessing and normalisation of the data. The next quality control step performs an additional sample check to remove low-quality data, which normalisation cannot detect. The workflow gives the user the opportunity to perform any of these preparation and data cleaning steps, including highly recommended genetic variation annotation step resulting in single nucleotide polymorphism identification and removal. Finally, the dataset generated through all of these steps can be used to hunt (find) differentially-methylated positions (DMP)and regions (DMR) with respect to a phenotype covariate.\n+\n+***Inputs*** \n+\n+*Series of .IDAT files*: red and green .idat file for each sample on the chip intensity data. \n+\n+*(optional) Preprocessing Methods*: by this step probes can be stratified by region via quantile normalization or by extended implementation of functional normalisation recommended for cases where global changes are expected such as in cancer-normal comparisons. In addition unwanted probes containing either a SNP at the CpG interrogation or at the single nucleotide extension can be removed (recommended). \n+\n+*Phenotype Table*: table of compared probes and their characteristics, may be categorical (e.g. cancer vs. normal) or continuous (e.g. blood pressure). \n+\n+========== ============== ===============\n+Accession Sensitivity Treatment\n+---------- -------------- ---------------\n+GSM1588704 sensitive MAPKi\n+---------- -------------- ---------------\n+GSM1588705 sensitive MAPKi\n+---------- -------------- ---------------\n+GSM1588706 resistant BRAFi\n+========== ============== =============== \n+\n+*Note*: phenotype covariate table must include the following information:\n+sampleID/Accession, phenotype and paird or unpaired samples column\n+\n+*Genome Table*: a reference genome that contains the nucleotide sequence of the chromosomes, It is representative of a specific genome build and release. \n+\n+***Outputs***\n+\n+*Quality Control Report and Plot*: quality control (QC) outputs plot of the log median intensity in both the methylated (M) and unmethylated (U) channels. When plotting these two medians against each other the good samples cluster together, while failed samples tend to separate and have lower median intensities.\n+\n+*(optional) SNPInfo Table*: matrix of the chromosome and the position of each SNP on a given Affymetrix SNP Array. \n+\n+*Differentially Methylated Regions*: consecutive genomic locations differentially methylated in the same direction save as multiple track lines in a single BED file. \n+\n+*Differentially Methylated Positions*: single genomic position that has a different methylated level in two different groups of samples (or conditions) save as multiple track lines in a single BED file.\n+ ]]></help>\n+ <citations>\n+ <citation type="doi">10.18129/B9.bioc.illuminaio</citation>\n+</citations>\n+</tool>\t\n' |