# HG changeset patch # User jeremyjliu # Date 1425009249 18000 # Node ID 4ce22698acb083cc1ce82940baad71091fef1046 # Parent fe8a884363dfef67f774499e754c4faecf9b333b Uploaded diff -r fe8a884363df -r 4ce22698acb0 pwms/jaspar.jolma.pwms.from.seq.RData Binary file pwms/jaspar.jolma.pwms.from.seq.RData has changed diff -r fe8a884363df -r 4ce22698acb0 pwms/mm9.pwms.from.seq.RData Binary file pwms/mm9.pwms.from.seq.RData has changed diff -r fe8a884363df -r 4ce22698acb0 pwms/pouya.pwms.from.seq.RData Binary file pwms/pouya.pwms.from.seq.RData has changed diff -r fe8a884363df -r 4ce22698acb0 region_motif_compare.r --- a/region_motif_compare.r Tue Feb 10 02:03:15 2015 -0500 +++ b/region_motif_compare.r Thu Feb 26 22:54:09 2015 -0500 @@ -4,13 +4,12 @@ # corrections. All enrichment ratios relative to overall count / gc ratios. # Author: Jeremy liu # Email: jeremy.liu@yale.edu -# Date: 15/02/04 +# Date: 15/02/11 # Note: This script is meant to be invoked with the following command -# R --slave --vanilla -f ./region_motif_compare.r --args -# +# R --slave --vanilla -f ./region_motif_compare.r --args +# # is working directory of galaxy installation -# types: "t" test, "p" pouya, "j" jaspar jolma, "m" mouse, "c" combined -# Dependencies: plotting.r +# Dependencies: region_motif_data_manager, plotting.r # Auxiliary function to concatenate multiple strings concat <- function(...) { @@ -24,20 +23,7 @@ # Set common and data directories args <- commandArgs() workingDir = args[7] -dbCode = args[8] -# dbCode "c" implemented when pwmFile is loaded -if (dbCode == "t" | dbCode == "p") { - pwmFile = concat(workingDir, "/pwms/pouya.pwms.from.seq.RData") -} else if (dbCode == "j") { - pwmFile = concat(workingDir, "/pwms/jaspar.jolma.pwms.from.seq.RData") -} else if (dbCode == "m") { - pwmFile = concat(workingDir, "/pwms/mm9.pwms.from.seq.RData") -} else if (dbCode == "c") { # rest of dbCode "c" implemented when pwmFile loaded - pwmFile = concat(workingDir, "/pwms/pouya.pwms.from.seq.RData") - pwmFile2 = concat(workingDir, "/pwms/jaspar.jolma.pwms.from.seq.RData") -} else { - pwmFile = concat(workingDir, "/pwms/pouya.pwms.from.seq.RData") -} +pwmFile = args[8].split(',')[0] # If duplicate entires, take first one # Set input and reference files inTab1 = args[9] @@ -63,11 +49,11 @@ # Loading motif position weight matrix (pwm) file and input tab file cat("Loading and reading input region motif count files...\n") load(pwmFile) # pwms data structure -if (dbCode == "c") { # Remaining implementation of dbCode "c" combined - temp = pwms - load(pwmFile2) - pwms = append(temp, pwms) -} +#if (dbCode == "c") { # Remaining implementation of dbCode "c" combined +# temp = pwms +# load(pwmFile2) +# pwms = append(temp, pwms) +#} region1DF = read_tsv(inTab1) region2DF = read_tsv(inTab2) region1Counts = region1DF$counts diff -r fe8a884363df -r 4ce22698acb0 region_motif_compare.xml --- a/region_motif_compare.xml Tue Feb 10 02:03:15 2015 -0500 +++ b/region_motif_compare.xml Thu Feb 26 22:54:09 2015 -0500 @@ -4,18 +4,28 @@ RMOTIF_PATH - region_motif_compare.r --args \$RMOTIF_PATH $db_type $in_tab_1 $in_tab_2 $out_enriched $out_depleted $out_plots + region_motif_compare.r --args \$RMOTIF_PATH $pwm_file.fields.path $in_tab_1 $in_tab_2 + $out_enriched + $out_depleted + $out_plots + + + + + + + diff -r fe8a884363df -r 4ce22698acb0 region_motif_db/MOTIF_DB_GOES_HERE diff -r fe8a884363df -r 4ce22698acb0 region_motif_db/pouya_test_motifs.bed.bgz Binary file region_motif_db/pouya_test_motifs.bed.bgz has changed diff -r fe8a884363df -r 4ce22698acb0 region_motif_db/pouya_test_motifs.bed.bgz.tbi Binary file region_motif_db/pouya_test_motifs.bed.bgz.tbi has changed diff -r fe8a884363df -r 4ce22698acb0 region_motif_intersect.r --- a/region_motif_intersect.r Tue Feb 10 02:03:15 2015 -0500 +++ b/region_motif_intersect.r Thu Feb 26 22:54:09 2015 -0500 @@ -1,9 +1,9 @@ # Name: region_motif_intersect.r # Description: Takes a bed file of target regions and counts intersections # of each motif (in separately installed tabix database) and target regions. -# Author: Jeremy liu +# Author: Jeremy Liu # Email: jeremy.liu@yale.edu -# Date: 15/02/04 +# Date: 15/02/11 # Note: This script is meant to be invoked with the following command # R --slave --vanilla -f ./region_motif_intersect.r --args # Dependencies: region_motif_data_manager @@ -16,8 +16,8 @@ # Retrive motif database path args <- commandArgs() -motifDB_bgz = args[7] -motifDB_tbi = args[8] +motifDB_bgz = args[7].split(',')[0] # Handles duplicate entries in data table +motifDB_tbi = args[8].split(',')[0] # Just takes the first one # Set input and reference files, comment to toggle commmand line arguments inBed = args[9] diff -r fe8a884363df -r 4ce22698acb0 region_motif_intersect.xml --- a/region_motif_intersect.xml Tue Feb 10 02:03:15 2015 -0500 +++ b/region_motif_intersect.xml Thu Feb 26 22:54:09 2015 -0500 @@ -1,8 +1,5 @@ for computing the motifs that lie inside a region set - region_motif_intersect.r --args $bgz_file.fields.path $tbi_file.fields.path $in_bed $out_tab @@ -17,8 +14,8 @@ diff -r fe8a884363df -r 4ce22698acb0 repository_dependencies.xml --- a/repository_dependencies.xml Tue Feb 10 02:03:15 2015 -0500 +++ b/repository_dependencies.xml Thu Feb 26 22:54:09 2015 -0500 @@ -1,4 +1,4 @@ - + diff -r fe8a884363df -r 4ce22698acb0 tool_dependencies.xml --- a/tool_dependencies.xml Tue Feb 10 02:03:15 2015 -0500 +++ b/tool_dependencies.xml Thu Feb 26 22:54:09 2015 -0500 @@ -3,14 +3,4 @@ $REPOSITORY_INSTALL_DIR - \ No newline at end of file