From noreply at r-forge.r-project.org Tue Mar 12 14:34:04 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 12 Mar 2013 14:34:04 +0100 (CET) Subject: [Patchwork-commits] r164 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/patchwork/R pkg/patchworkCG/R www Message-ID: <20130312133404.861401810A3@r-forge.r-project.org> Author: sebastian_d Date: 2013-03-12 14:34:03 +0100 (Tue, 12 Mar 2013) New Revision: 164 Modified: .git/COMMIT_EDITMSG .git/index .git/logs/HEAD .git/logs/refs/heads/master .git/logs/refs/remotes/origin/master .git/refs/heads/master .git/refs/remotes/origin/master pkg/patchwork/R/karyotype.r pkg/patchwork/R/karyotype_check.r pkg/patchwork/R/karyotype_chroms.r pkg/patchwork/R/karyotype_chromsCN.r pkg/patchwork/R/patchwork.alleledata.r pkg/patchwork/R/patchwork.plot.r pkg/patchworkCG/R/patchwork.CG.plot.r www/changelog.php www/pw_exec.php Log: Changes by markus to filter out alf heterozygous snps when lacking normal sample. Also some changes to plotting (titles) by sebastian. Modified: .git/COMMIT_EDITMSG =================================================================== --- .git/COMMIT_EDITMSG 2013-02-22 08:57:15 UTC (rev 163) +++ .git/COMMIT_EDITMSG 2013-03-12 13:34:03 UTC (rev 164) @@ -1 +1 @@ -some homepage updates from alexeys feedback +Add titles to patchwork plots among other things Modified: .git/index =================================================================== (Binary files differ) Modified: .git/logs/HEAD =================================================================== --- .git/logs/HEAD 2013-02-22 08:57:15 UTC (rev 163) +++ .git/logs/HEAD 2013-03-12 13:34:03 UTC (rev 164) @@ -32,3 +32,5 @@ acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo 1360761388 +0100 commit: Updated error handling in pile2alleles f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 ae581e53647259304439e470cd67db340b07cb35 Sebastian DiLorenzo 1360838155 +0100 commit: Added somatic.Rdata output, also started modifying changelog. Need to change homepage in the future (when we have worked out the kinks) to reflect that patchwork outputs this information ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo 1361523526 +0100 commit: some homepage updates from alexeys feedback +2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo 1363092610 +0100 commit: Add titles to patchwork plots among other things +5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : Fast-forward Modified: .git/logs/refs/heads/master =================================================================== --- .git/logs/refs/heads/master 2013-02-22 08:57:15 UTC (rev 163) +++ .git/logs/refs/heads/master 2013-03-12 13:34:03 UTC (rev 164) @@ -32,3 +32,5 @@ acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo 1360761388 +0100 commit: Updated error handling in pile2alleles f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 ae581e53647259304439e470cd67db340b07cb35 Sebastian DiLorenzo 1360838155 +0100 commit: Added somatic.Rdata output, also started modifying changelog. Need to change homepage in the future (when we have worked out the kinks) to reflect that patchwork outputs this information ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo 1361523526 +0100 commit: some homepage updates from alexeys feedback +2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo 1363092610 +0100 commit: Add titles to patchwork plots among other things +5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : Fast-forward Modified: .git/logs/refs/remotes/origin/master =================================================================== --- .git/logs/refs/remotes/origin/master 2013-02-22 08:57:15 UTC (rev 163) +++ .git/logs/refs/remotes/origin/master 2013-03-12 13:34:03 UTC (rev 164) @@ -32,3 +32,5 @@ acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo 1360761405 +0100 update by push f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 ae581e53647259304439e470cd67db340b07cb35 Sebastian DiLorenzo 1360838170 +0100 update by push ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo 1361523599 +0100 update by push +2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo 1363092633 +0100 update by push +5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : fast-forward Modified: .git/refs/heads/master =================================================================== --- .git/refs/heads/master 2013-02-22 08:57:15 UTC (rev 163) +++ .git/refs/heads/master 2013-03-12 13:34:03 UTC (rev 164) @@ -1 +1 @@ -2fdc7676c81d53b78e022a0f9d97b06c7133fc0d +6a55102231aa819f1e4616dde7c28ea32af8a06c Modified: .git/refs/remotes/origin/master =================================================================== --- .git/refs/remotes/origin/master 2013-02-22 08:57:15 UTC (rev 163) +++ .git/refs/remotes/origin/master 2013-03-12 13:34:03 UTC (rev 164) @@ -1 +1 @@ -2fdc7676c81d53b78e022a0f9d97b06c7133fc0d +6a55102231aa819f1e4616dde7c28ea32af8a06c Modified: pkg/patchwork/R/karyotype.r =================================================================== --- pkg/patchwork/R/karyotype.r 2013-02-22 08:57:15 UTC (rev 163) +++ pkg/patchwork/R/karyotype.r 2013-03-12 13:34:03 UTC (rev 164) @@ -90,6 +90,10 @@ xaxt="n") axis(1,cex.axis=1.5) axis(2,cex.axis=1.5) + if(c==1) + { + title(main=paste("Sample: ",name,sep=""),cex.main=2) + } par(new=F) } dev.off() Modified: pkg/patchwork/R/karyotype_check.r =================================================================== --- pkg/patchwork/R/karyotype_check.r 2013-02-22 08:57:15 UTC (rev 163) +++ pkg/patchwork/R/karyotype_check.r 2013-03-12 13:34:03 UTC (rev 164) @@ -56,6 +56,7 @@ xaxt="n") axis(1,cex.axis=2) axis(2,cex.axis=2) + title(main=paste("Sample: ",name,sep=""),cex.main=2) text(variants_data[,1],variants_data[,2], labels=variants, Modified: pkg/patchwork/R/karyotype_chroms.r =================================================================== --- pkg/patchwork/R/karyotype_chroms.r 2013-02-22 08:57:15 UTC (rev 163) +++ pkg/patchwork/R/karyotype_chroms.r 2013-03-12 13:34:03 UTC (rev 164) @@ -94,6 +94,10 @@ axis(2,at=seq(0,1,0.1),cex.axis=2) mtext(text="Allelic imbalance",side=2,line=4,las=3,cex=2) mtext(text="Coverage, all segments",side=1,line=4,cex=2,las=1) + if(c==1) + { + title(main=paste("Sample: ",name,sep=""),cex.main=2) + } par(new=F) mix <- mchr==as.character(this$chr) Modified: pkg/patchwork/R/karyotype_chromsCN.r =================================================================== --- pkg/patchwork/R/karyotype_chromsCN.r 2013-02-22 08:57:15 UTC (rev 163) +++ pkg/patchwork/R/karyotype_chromsCN.r 2013-03-12 13:34:03 UTC (rev 164) @@ -95,6 +95,10 @@ axis(2,at=seq(0,1,0.1),cex.axis=2) mtext(text="Allelic imbalance",side=2,line=4,las=3,cex=2) mtext(text="Coverage, all segments",side=1,line=4,cex=2,las=1) + if(c==1) + { + title(main=paste("Sample: ",name,sep=""),cex.main=2) + } col=rep('#000000',sum(ix)) col[pos[ix] < this$mid] <- loc_p[ceiling(pos[ix][pos[ix] < this$mid]/100)] Modified: pkg/patchwork/R/patchwork.alleledata.r =================================================================== --- pkg/patchwork/R/patchwork.alleledata.r 2013-02-22 08:57:15 UTC (rev 163) +++ pkg/patchwork/R/patchwork.alleledata.r 2013-03-12 13:34:03 UTC (rev 164) @@ -80,7 +80,10 @@ data(commonSnps132,package="patchworkData") } + # Annotate with dbSNP + dbSnp=dbSnp[,c(1,3)]; dbSnp$dbSnp=T alf=merge(alf,dbSnp[,c(1,3)], all.x=T, all.y=F, by=1:2) + alf$dbSnp[is.na(alf$dbSnp)]=F #Finally, if a matched normal was available, remove SNPs that were not (somewhat) heterozygous there. #if (!is.null(normalalf)) { Modified: pkg/patchwork/R/patchwork.plot.r =================================================================== --- pkg/patchwork/R/patchwork.plot.r 2013-02-22 08:57:15 UTC (rev 163) +++ pkg/patchwork/R/patchwork.plot.r 2013-03-12 13:34:03 UTC (rev 164) @@ -39,9 +39,7 @@ #Create normalalf if (!is.null(Normal.pileup)) normalalf <- patchwork.alleledata(Normal.pileup, vcf=Normal.vcf) - alf = patchwork.alleledata(Tumor.pileup, - #normalalf=normalalf, - vcf=Tumor.vcf) + alf = patchwork.alleledata(Tumor.pileup, vcf=Tumor.vcf) # if(!is.null(Normal.pileup) & !is.null(Reference)) # { @@ -63,6 +61,7 @@ save(alf, normalalf,file=paste(name,"_pile.alleles.Rdata",sep="")) } + ## If there is a pileup for matched normal if (!is.null(normalalf)) { ## Extract somatic variants @@ -73,6 +72,10 @@ ## Remove all but the heterozygous SNPs normalalf <- normalalf[normalalf$amin/normalalf$atot > 0.2,] alf <- merge(normalalf[,1:2],alf,by=1:2,all=F) + } else + { ## If there is NO pileup for matched normal + alf <- alf[alf$dbSnp==T,] + alf <- alf[alf$min>1 & alf$ref>2,] } @@ -193,7 +196,7 @@ ylim=c(0.1,1)) cat("Plotting Complete \n") cat("patchwork.plot Complete.\n") - cat("Below you may see some warning messages, you can read about these on our homepage. They are nothing to be worried about. \n") + cat("Below you may see some warning messages, you can read about these on our homepage. They are either nothing to be worry about (\"Tried to load file, it didn't exist.\") or something you should send us an email about. \n") } \ No newline at end of file Modified: pkg/patchworkCG/R/patchwork.CG.plot.r =================================================================== --- pkg/patchworkCG/R/patchwork.CG.plot.r 2013-02-22 08:57:15 UTC (rev 163) +++ pkg/patchworkCG/R/patchwork.CG.plot.r 2013-03-12 13:34:03 UTC (rev 164) @@ -19,6 +19,21 @@ cat("\n","Enter complete path AND filename to your depthOfCoverage file:","\n") dc = scan(n=1,what=character()) + + #Check if the files exists + if(file.exists(mv)==F) + { + stop("The required file,masterVarBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + if(file.exists(sm)==F) + { + stop("The required file,somaticCnvSegmentsNondiploidBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + if(file.exists(dc)==F) + { + stop("The required file,depthOfCoverage, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + skip_mv = scan(file=mv,n=1,what=character(),quiet=T) i = 1 j = grep(">locus",skip_mv) @@ -72,7 +87,21 @@ } else if(length(masterVarBeta) == 1 & length(somaticCnvSegments) == 1 & length(depthOfCoverage) == 1) { - + + #Check if the files exists + if(file.exists(masterVarBeta)==F) + { + stop("The required file,masterVarBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + if(file.exists(masterVarBeta)==F) + { + stop("The required file,somaticCnvSegmentsNondiploidBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + if(file.exists(masterVarBeta)==F) + { + stop("The required file,depthOfCoverage, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + mv_ = strsplit(masterVarBeta,"/") sm_ = strsplit(somaticCnvSegments,"/") dc_ = strsplit(depthOfCoverage,"/") @@ -134,6 +163,7 @@ } else { + #Check that path is given if(length(path)==0) { stop("You must input the required files, either by the path parameter, manual_file_input parameter or individual pointer parameters to the files in question. See ?patchwork.CG.plot") @@ -143,6 +173,20 @@ segm_ = list.files(path=path_segm,pattern="somaticCnvSegmentsNondiploid") depcov_ = list.files(path=path_segm,pattern="depthOfCoverage") + #If the files were not found. + if(length(mastervar_)==0) + { + stop("The required file,masterVarBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + if(length(segm_)==0) + { + stop("The required file,somaticCnvSegmentsNondiploidBeta, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + if(length(depcov_)==0) + { + stop("The required file,depthOfCoverage, could not be found. Did you input the correct path? See ?patchwork.CG.plot") + } + skip_mv = scan(file=paste(path,"/",mastervar_,sep=""),n=1,what=character(),quiet=T) i = 1 j = grep(">locus",skip_mv) Modified: www/changelog.php =================================================================== --- www/changelog.php 2013-02-22 08:57:15 UTC (rev 163) +++ www/changelog.php 2013-03-12 13:34:03 UTC (rev 164) @@ -11,6 +11,8 @@
2013
  • Patchwork now gives you an additional file, <sample_name>_somatic.Rdata, which contains possible, unfiltered, somatic variants.
  • +
  • PatchworkCG now has better file handling to avoid an error where it would not start reading files but not give an error either.
  • +
  • Patchwork now includes sample filename as title in plot output.
-->
Modified: www/pw_exec.php =================================================================== --- www/pw_exec.php 2013-02-22 08:57:15 UTC (rev 163) +++ www/pw_exec.php 2013-03-12 13:34:03 UTC (rev 164) @@ -17,7 +17,7 @@ and used 10GB (out of 24GB available) RAM. However there are many factors that influence runtime so be generous with time/RAM allocation!)

-Initiate the R environment and load the patchwork and patchworkData libraries:
+Start by initiate the R environment and loading the patchwork and patchworkData libraries:
 	library(patchwork)
@@ -210,6 +210,8 @@
 		(Some warning messages about trying to load the files in the checklist below is not uncommon)
 
+If you get any errors not mentioned on the homepage please send us an email, and we will get back to you as soon as possible!

+ Your working directory should now have the plots generated from the function, 1 overview plot and 24 chromosomal plots.

From noreply at r-forge.r-project.org Fri Mar 15 14:47:20 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 15 Mar 2013 14:47:20 +0100 (CET) Subject: [Patchwork-commits] r165 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/patchwork/R Message-ID: <20130315134720.CC207184F24@r-forge.r-project.org> Author: sebastian_d Date: 2013-03-15 14:47:20 +0100 (Fri, 15 Mar 2013) New Revision: 165 Modified: .git/index .git/logs/HEAD .git/logs/refs/heads/master .git/logs/refs/remotes/origin/master .git/refs/heads/master .git/refs/remotes/origin/master pkg/patchwork/R/patchwork.alleledata.r pkg/patchwork/R/patchwork.plot.r Log: Hopefully fixed a bugg where AI got set to 0 for all snps Modified: .git/index =================================================================== (Binary files differ) Modified: .git/logs/HEAD =================================================================== --- .git/logs/HEAD 2013-03-12 13:34:03 UTC (rev 164) +++ .git/logs/HEAD 2013-03-15 13:47:20 UTC (rev 165) @@ -34,3 +34,5 @@ ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo 1361523526 +0100 commit: some homepage updates from alexeys feedback 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo 1363092610 +0100 commit: Add titles to patchwork plots among other things 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : Fast-forward +6a55102231aa819f1e4616dde7c28ea32af8a06c 22eb0c8de456d9ed783868a3db491b52008fb116 Sebastian DiLorenzo 1363252090 +0100 pull : Fast-forward +22eb0c8de456d9ed783868a3db491b52008fb116 028901af11a1b01a4147feab3f19214457984911 Sebastian DiLorenzo 1363350024 +0100 pull : Fast-forward Modified: .git/logs/refs/heads/master =================================================================== --- .git/logs/refs/heads/master 2013-03-12 13:34:03 UTC (rev 164) +++ .git/logs/refs/heads/master 2013-03-15 13:47:20 UTC (rev 165) @@ -34,3 +34,5 @@ ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo 1361523526 +0100 commit: some homepage updates from alexeys feedback 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo 1363092610 +0100 commit: Add titles to patchwork plots among other things 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : Fast-forward +6a55102231aa819f1e4616dde7c28ea32af8a06c 22eb0c8de456d9ed783868a3db491b52008fb116 Sebastian DiLorenzo 1363252090 +0100 pull : Fast-forward +22eb0c8de456d9ed783868a3db491b52008fb116 028901af11a1b01a4147feab3f19214457984911 Sebastian DiLorenzo 1363350024 +0100 pull : Fast-forward Modified: .git/logs/refs/remotes/origin/master =================================================================== --- .git/logs/refs/remotes/origin/master 2013-03-12 13:34:03 UTC (rev 164) +++ .git/logs/refs/remotes/origin/master 2013-03-15 13:47:20 UTC (rev 165) @@ -34,3 +34,5 @@ ae581e53647259304439e470cd67db340b07cb35 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d Sebastian DiLorenzo 1361523599 +0100 update by push 2fdc7676c81d53b78e022a0f9d97b06c7133fc0d 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 Sebastian DiLorenzo 1363092633 +0100 update by push 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : fast-forward +6a55102231aa819f1e4616dde7c28ea32af8a06c 22eb0c8de456d9ed783868a3db491b52008fb116 Sebastian DiLorenzo 1363252090 +0100 pull : fast-forward +22eb0c8de456d9ed783868a3db491b52008fb116 028901af11a1b01a4147feab3f19214457984911 Sebastian DiLorenzo 1363350024 +0100 pull : fast-forward Modified: .git/refs/heads/master =================================================================== --- .git/refs/heads/master 2013-03-12 13:34:03 UTC (rev 164) +++ .git/refs/heads/master 2013-03-15 13:47:20 UTC (rev 165) @@ -1 +1 @@ -6a55102231aa819f1e4616dde7c28ea32af8a06c +028901af11a1b01a4147feab3f19214457984911 Modified: .git/refs/remotes/origin/master =================================================================== --- .git/refs/remotes/origin/master 2013-03-12 13:34:03 UTC (rev 164) +++ .git/refs/remotes/origin/master 2013-03-15 13:47:20 UTC (rev 165) @@ -1 +1 @@ -6a55102231aa819f1e4616dde7c28ea32af8a06c +028901af11a1b01a4147feab3f19214457984911 Modified: pkg/patchwork/R/patchwork.alleledata.r =================================================================== --- pkg/patchwork/R/patchwork.alleledata.r 2013-03-12 13:34:03 UTC (rev 164) +++ pkg/patchwork/R/patchwork.alleledata.r 2013-03-15 13:47:20 UTC (rev 165) @@ -82,7 +82,7 @@ # Annotate with dbSNP dbSnp=dbSnp[,c(1,3)]; dbSnp$dbSnp=T - alf=merge(alf,dbSnp[,c(1,3)], all.x=T, all.y=F, by=1:2) + alf=merge(alf,dbSnp, all.x=T, all.y=F, by=1:2) alf$dbSnp[is.na(alf$dbSnp)]=F #Finally, if a matched normal was available, remove SNPs that were not (somewhat) heterozygous there. Modified: pkg/patchwork/R/patchwork.plot.r =================================================================== --- pkg/patchwork/R/patchwork.plot.r 2013-03-12 13:34:03 UTC (rev 164) +++ pkg/patchwork/R/patchwork.plot.r 2013-03-15 13:47:20 UTC (rev 165) @@ -73,9 +73,9 @@ normalalf <- normalalf[normalalf$amin/normalalf$atot > 0.2,] alf <- merge(normalalf[,1:2],alf,by=1:2,all=F) } else - { ## If there is NO pileup for matched normal - alf <- alf[alf$dbSnp==T,] - alf <- alf[alf$min>1 & alf$ref>2,] + { ## If there was NO pileup for matched normal + alf <- alf[alf$dbSnp==T,] + alf <- alf[alf$amin>1 & alf$aref>2,] } From noreply at r-forge.r-project.org Tue Mar 19 11:43:37 2013 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 19 Mar 2013 11:43:37 +0100 (CET) Subject: [Patchwork-commits] r166 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/patchwork/R pkg/patchwork/inst/perl Message-ID: <20130319104337.D8A49180941@r-forge.r-project.org> Author: sebastian_d Date: 2013-03-19 11:43:37 +0100 (Tue, 19 Mar 2013) New Revision: 166 Modified: .git/COMMIT_EDITMSG .git/index .git/logs/HEAD .git/logs/refs/heads/master .git/logs/refs/remotes/origin/master .git/refs/heads/master .git/refs/remotes/origin/master pkg/patchwork/R/patchwork.alleledata.r pkg/patchwork/R/patchwork.plot.r pkg/patchwork/inst/perl/pile2alleles.pl Log: stable version, some changes to allele information and some changes to call correct snp list (hg18 or hg19). Modified: .git/COMMIT_EDITMSG =================================================================== --- .git/COMMIT_EDITMSG 2013-03-15 13:47:20 UTC (rev 165) +++ .git/COMMIT_EDITMSG 2013-03-19 10:43:37 UTC (rev 166) @@ -1 +1 @@ -Add titles to patchwork plots among other things +Added patchwork messaging to know which file is being used for allele data generation Modified: .git/index =================================================================== (Binary files differ) Modified: .git/logs/HEAD =================================================================== --- .git/logs/HEAD 2013-03-15 13:47:20 UTC (rev 165) +++ .git/logs/HEAD 2013-03-19 10:43:37 UTC (rev 166) @@ -36,3 +36,5 @@ 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : Fast-forward 6a55102231aa819f1e4616dde7c28ea32af8a06c 22eb0c8de456d9ed783868a3db491b52008fb116 Sebastian DiLorenzo 1363252090 +0100 pull : Fast-forward 22eb0c8de456d9ed783868a3db491b52008fb116 028901af11a1b01a4147feab3f19214457984911 Sebastian DiLorenzo 1363350024 +0100 pull : Fast-forward +028901af11a1b01a4147feab3f19214457984911 aa2927bca2c8a8dcd8482384ed8ed97995508514 Sebastian DiLorenzo 1363604552 +0100 commit: fixed an issue where hg18 common snps list was not being used when it should have been +aa2927bca2c8a8dcd8482384ed8ed97995508514 f25144d2475776c2cec713208516fe1072862311 Sebastian DiLorenzo 1363613325 +0100 commit: Added patchwork messaging to know which file is being used for allele data generation Modified: .git/logs/refs/heads/master =================================================================== --- .git/logs/refs/heads/master 2013-03-15 13:47:20 UTC (rev 165) +++ .git/logs/refs/heads/master 2013-03-19 10:43:37 UTC (rev 166) @@ -36,3 +36,5 @@ 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : Fast-forward 6a55102231aa819f1e4616dde7c28ea32af8a06c 22eb0c8de456d9ed783868a3db491b52008fb116 Sebastian DiLorenzo 1363252090 +0100 pull : Fast-forward 22eb0c8de456d9ed783868a3db491b52008fb116 028901af11a1b01a4147feab3f19214457984911 Sebastian DiLorenzo 1363350024 +0100 pull : Fast-forward +028901af11a1b01a4147feab3f19214457984911 aa2927bca2c8a8dcd8482384ed8ed97995508514 Sebastian DiLorenzo 1363604552 +0100 commit: fixed an issue where hg18 common snps list was not being used when it should have been +aa2927bca2c8a8dcd8482384ed8ed97995508514 f25144d2475776c2cec713208516fe1072862311 Sebastian DiLorenzo 1363613325 +0100 commit: Added patchwork messaging to know which file is being used for allele data generation Modified: .git/logs/refs/remotes/origin/master =================================================================== --- .git/logs/refs/remotes/origin/master 2013-03-15 13:47:20 UTC (rev 165) +++ .git/logs/refs/remotes/origin/master 2013-03-19 10:43:37 UTC (rev 166) @@ -36,3 +36,5 @@ 5a37be0dedd4d5f3720b63e057e7f2a5d363bbf5 6a55102231aa819f1e4616dde7c28ea32af8a06c Sebastian DiLorenzo 1363095404 +0100 pull : fast-forward 6a55102231aa819f1e4616dde7c28ea32af8a06c 22eb0c8de456d9ed783868a3db491b52008fb116 Sebastian DiLorenzo 1363252090 +0100 pull : fast-forward 22eb0c8de456d9ed783868a3db491b52008fb116 028901af11a1b01a4147feab3f19214457984911 Sebastian DiLorenzo 1363350024 +0100 pull : fast-forward +028901af11a1b01a4147feab3f19214457984911 aa2927bca2c8a8dcd8482384ed8ed97995508514 Sebastian DiLorenzo 1363604601 +0100 update by push +aa2927bca2c8a8dcd8482384ed8ed97995508514 f25144d2475776c2cec713208516fe1072862311 Sebastian DiLorenzo 1363613338 +0100 update by push Modified: .git/refs/heads/master =================================================================== --- .git/refs/heads/master 2013-03-15 13:47:20 UTC (rev 165) +++ .git/refs/heads/master 2013-03-19 10:43:37 UTC (rev 166) @@ -1 +1 @@ -028901af11a1b01a4147feab3f19214457984911 +f25144d2475776c2cec713208516fe1072862311 Modified: .git/refs/remotes/origin/master =================================================================== --- .git/refs/remotes/origin/master 2013-03-15 13:47:20 UTC (rev 165) +++ .git/refs/remotes/origin/master 2013-03-19 10:43:37 UTC (rev 166) @@ -1 +1 @@ -028901af11a1b01a4147feab3f19214457984911 +f25144d2475776c2cec713208516fe1072862311 Modified: pkg/patchwork/R/patchwork.alleledata.r =================================================================== --- pkg/patchwork/R/patchwork.alleledata.r 2013-03-15 13:47:20 UTC (rev 165) +++ pkg/patchwork/R/patchwork.alleledata.r 2013-03-19 10:43:37 UTC (rev 166) @@ -66,12 +66,19 @@ #Check if HG18 or HG19 should be applied con = file(Pileup,"rt") - firstline = readLines(con,1) + line = readLines(con,1) + hgcheck = strsplit(line,"\t") + + #Sometimes chr1 isnt first in the pileup file, traverse until you get to chr1 to see if hg18 or hg19 should be applied. + while(hgcheck[[1]][1] != "chr1") + { + line = readLines(con,1) + hgcheck = strsplit(line,"\t") + } close(con) - hgcheck = strsplit(firstline,"\t") - if (hgcheck[[1]][2] <= 10000) + if (as.numeric(hgcheck[[1]][2]) <= 10000) { data(commonSnpsHG18,package="patchworkData") } Modified: pkg/patchwork/R/patchwork.plot.r =================================================================== --- pkg/patchwork/R/patchwork.plot.r 2013-03-15 13:47:20 UTC (rev 165) +++ pkg/patchwork/R/patchwork.plot.r 2013-03-19 10:43:37 UTC (rev 166) @@ -31,14 +31,25 @@ #you are running R from. (getwd()) if(is.null(alf)) { - cat("Initiating Allele Data Generation \n") - #If Normal.pileup exists, use with normal.vcf (if mpileup) or without (if pileup) to #create normalalf in patchwork.alleledata() #Create normalalf - if (!is.null(Normal.pileup)) normalalf <- patchwork.alleledata(Normal.pileup, vcf=Normal.vcf) + + if (!is.null(Normal.pileup)) + { + normal.pileup.name = strsplit(Normal.pileup,"/") + normal.pileup.name = normal.pileup.name[[1]][length(normal.pileup.name[[1]])] + cat(paste("Initiating Normal Allele Data Generation (",normal.pileup.name,") \n",sep="")) + normalalf <- patchwork.alleledata(Normal.pileup, vcf=Normal.vcf) + } + + tumor.pileup.name = strsplit(Tumor.pileup,"/") + + tumor.pileup.name = tumor.pileup.name[[1]][length(tumor.pileup.name[[1]])] + + cat(paste("Initiating Tumor Allele Data Generation (",tumor.pileup.name,") \n",sep="")) alf = patchwork.alleledata(Tumor.pileup, vcf=Tumor.vcf) # if(!is.null(Normal.pileup) & !is.null(Reference)) Modified: pkg/patchwork/inst/perl/pile2alleles.pl =================================================================== --- pkg/patchwork/inst/perl/pile2alleles.pl 2013-03-15 13:47:20 UTC (rev 165) +++ pkg/patchwork/inst/perl/pile2alleles.pl 2013-03-19 10:43:37 UTC (rev 166) @@ -32,7 +32,11 @@ $iupac{'T'}{'S'} = 'G|C'; $iupac{'T'}{'M'} = 'A|C'; -while () { +#my $filename = ; +#$filename = chomp($filename); + +while () +{ chomp; #if ($_ == ""){next;} if ($_ =~ /(\S+)\t(\S+)\t(\S+)\t(\S+)\t(\S+)\t\S+\t\S+\t(\S+)\t(\S+)\t\S+/) @@ -75,6 +79,7 @@ } else { + #print STDERR "In file $filename, line incompatible: $_ \n"; print STDERR "Line incompatible: $_ \n"; } }