[Patchwork-commits] r178 - .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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 24 14:33:06 CEST 2013


Author: sebastian_d
Date: 2013-06-24 14:33:05 +0200 (Mon, 24 Jun 2013)
New Revision: 178

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/inst/perl/mpile2alleles.pl
Log:
buggfix for mpilup and patchwork.alleledata

Modified: .git/COMMIT_EDITMSG
===================================================================
--- .git/COMMIT_EDITMSG	2013-06-24 12:07:52 UTC (rev 177)
+++ .git/COMMIT_EDITMSG	2013-06-24 12:33:05 UTC (rev 178)
@@ -1 +1 @@
-Fix for library loading in TAPS
+buggfix for mpilup and patchwork.alleledata

Modified: .git/index
===================================================================
(Binary files differ)

Modified: .git/logs/HEAD
===================================================================
--- .git/logs/HEAD	2013-06-24 12:07:52 UTC (rev 177)
+++ .git/logs/HEAD	2013-06-24 12:33:05 UTC (rev 178)
@@ -48,3 +48,6 @@
 b6c91dc80295b120969877f8e582708fb89038cc 532c860ab5cdbc3cbfd3537ef8fe60f35d4935de Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371462084 +0200	pull : Merge made by recursive.
 532c860ab5cdbc3cbfd3537ef8fe60f35d4935de 8fa9d868a51e8b4bdee100d16c6219d2541df0a6 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371566516 +0200	commit: Substantial changes to homepage which now incudes TAPS tutorial as well as some changes to TAPS
 8fa9d868a51e8b4bdee100d16c6219d2541df0a6 49637041dfcf47c07ecaa49251071ba4e2ad377a Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371633024 +0200	commit: Fix for library loading in TAPS
+49637041dfcf47c07ecaa49251071ba4e2ad377a 85bd8859e23a1fd9cc13dca12d161787786508c9 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371644646 +0200	commit: hopefully fixes to mpile2alleles
+85bd8859e23a1fd9cc13dca12d161787786508c9 86dcc04de9d77c535ad155fdfd870ee62c5e9cd4 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371719448 +0200	commit: Another fix to mpileup. Time for a QA
+86dcc04de9d77c535ad155fdfd870ee62c5e9cd4 5a0091d4eaca40691cb6bc59d83f9d1ab55f8566 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1372076903 +0200	commit: small change to alleledata to fix HG check.

Modified: .git/logs/refs/heads/master
===================================================================
--- .git/logs/refs/heads/master	2013-06-24 12:07:52 UTC (rev 177)
+++ .git/logs/refs/heads/master	2013-06-24 12:33:05 UTC (rev 178)
@@ -48,3 +48,6 @@
 b6c91dc80295b120969877f8e582708fb89038cc 532c860ab5cdbc3cbfd3537ef8fe60f35d4935de Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371462084 +0200	pull : Merge made by recursive.
 532c860ab5cdbc3cbfd3537ef8fe60f35d4935de 8fa9d868a51e8b4bdee100d16c6219d2541df0a6 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371566516 +0200	commit: Substantial changes to homepage which now incudes TAPS tutorial as well as some changes to TAPS
 8fa9d868a51e8b4bdee100d16c6219d2541df0a6 49637041dfcf47c07ecaa49251071ba4e2ad377a Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371633024 +0200	commit: Fix for library loading in TAPS
+49637041dfcf47c07ecaa49251071ba4e2ad377a 85bd8859e23a1fd9cc13dca12d161787786508c9 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371644646 +0200	commit: hopefully fixes to mpile2alleles
+85bd8859e23a1fd9cc13dca12d161787786508c9 86dcc04de9d77c535ad155fdfd870ee62c5e9cd4 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371719448 +0200	commit: Another fix to mpileup. Time for a QA
+86dcc04de9d77c535ad155fdfd870ee62c5e9cd4 5a0091d4eaca40691cb6bc59d83f9d1ab55f8566 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1372076903 +0200	commit: small change to alleledata to fix HG check.

Modified: .git/logs/refs/remotes/origin/master
===================================================================
--- .git/logs/refs/remotes/origin/master	2013-06-24 12:07:52 UTC (rev 177)
+++ .git/logs/refs/remotes/origin/master	2013-06-24 12:33:05 UTC (rev 178)
@@ -46,3 +46,6 @@
 5eeba51632467a2cf6300bb53b26c98e0a03d735 6eb4b7b50b8a1e1e97b2abc30404fa09d78e029e Sebastian DiLorenzo <S_D at imv096.medsci.uu.se> 1371461678 +0200	pull : fast-forward
 6eb4b7b50b8a1e1e97b2abc30404fa09d78e029e 8fa9d868a51e8b4bdee100d16c6219d2541df0a6 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371566540 +0200	update by push
 8fa9d868a51e8b4bdee100d16c6219d2541df0a6 49637041dfcf47c07ecaa49251071ba4e2ad377a Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371633040 +0200	update by push
+49637041dfcf47c07ecaa49251071ba4e2ad377a 85bd8859e23a1fd9cc13dca12d161787786508c9 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371644659 +0200	update by push
+85bd8859e23a1fd9cc13dca12d161787786508c9 86dcc04de9d77c535ad155fdfd870ee62c5e9cd4 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1371719471 +0200	update by push
+86dcc04de9d77c535ad155fdfd870ee62c5e9cd4 5a0091d4eaca40691cb6bc59d83f9d1ab55f8566 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1372076931 +0200	update by push

Modified: .git/refs/heads/master
===================================================================
--- .git/refs/heads/master	2013-06-24 12:07:52 UTC (rev 177)
+++ .git/refs/heads/master	2013-06-24 12:33:05 UTC (rev 178)
@@ -1 +1 @@
-49637041dfcf47c07ecaa49251071ba4e2ad377a
+5a0091d4eaca40691cb6bc59d83f9d1ab55f8566

Modified: .git/refs/remotes/origin/master
===================================================================
--- .git/refs/remotes/origin/master	2013-06-24 12:07:52 UTC (rev 177)
+++ .git/refs/remotes/origin/master	2013-06-24 12:33:05 UTC (rev 178)
@@ -1 +1 @@
-49637041dfcf47c07ecaa49251071ba4e2ad377a
+5a0091d4eaca40691cb6bc59d83f9d1ab55f8566

Modified: pkg/patchwork/R/patchwork.alleledata.r
===================================================================
--- pkg/patchwork/R/patchwork.alleledata.r	2013-06-24 12:07:52 UTC (rev 177)
+++ pkg/patchwork/R/patchwork.alleledata.r	2013-06-24 12:33:05 UTC (rev 178)
@@ -74,7 +74,8 @@
 	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") || (hgcheck[[1]][1] != "1"))
+		#while hgcheck is not "chr1" AND not "1"
+	while((hgcheck[[1]][1] != "chr1") && (hgcheck[[1]][1] != "1"))
 		{
 		line = readLines(con,1)
 		hgcheck = strsplit(line,"\t")

Modified: pkg/patchwork/inst/perl/mpile2alleles.pl
===================================================================
--- pkg/patchwork/inst/perl/mpile2alleles.pl	2013-06-24 12:07:52 UTC (rev 177)
+++ pkg/patchwork/inst/perl/mpile2alleles.pl	2013-06-24 12:33:05 UTC (rev 178)
@@ -14,6 +14,12 @@
 open(PILEUP,$ARGV[0]) or die "Could not read from $ARGV[0] , stopping.";
 open(VCF,$ARGV[1]) or die "Could not read from $ARGV[1] , stopping.";
 
+#For testing purposes
+#OUT shows faulty lines and the values they are given
+#OK shows a bunch of OK lines to compare too.
+# open(OUT,">out.txt");
+# open(OK,">OK.txt");
+
 my %snps;
 my %iupac;
 $iupac{'A'}{'R'} = 'G';
@@ -41,30 +47,67 @@
 $iupac{'T'}{'S'} = 'G|C';
 $iupac{'T'}{'M'} = 'A|C';
 
+#For testing purposes
+# my $i = 0;
+# my $j = 0;
 
+#perl mpile2alleles.pl SRR389821.mpileup SRR389821.vcf > test.out
+
 while (<VCF>)
 	{
 	chomp;
 	next if /^#/;
 	my ($vchr, $vpos, $cons, $consQual) = (split /\t/, $_)[0,1,4,5];
 
+	next if $cons eq 'N';
+	next if length $cons > 1;
+	$cons = uc $cons;
+
 	while (<PILEUP>) 
 		{
 		chomp;
 		my ($chr, $pos, $ref, $depth, $baseString) = (split /\t/, $_)[0,1,2,3,4];
 
+		#For testing purposes
+		# $j++;
+
+		#uc upper case
+		$ref = uc $ref;
+		next if $ref eq '*';
+
 		#If the position and chromosome match between pileup and vcf
 		# add if smaller than
 		if ($vchr eq $chr && $vpos == $pos)
 			{
-			$ref = uc $ref;
-			next if $ref eq '*';
-			next if $cons eq 'N';
 			my $snp = ($cons =~ m/[AGCT]/) ? $cons : $iupac{$ref}{$cons};
 			$snps{$chr}{$pos}{'ref'} = $ref;
 			$snps{$chr}{$pos}{'snp'} = $snp;
 			$snps{$chr}{$pos}{'qual'} = $consQual;
 
+		# 	#For testing purposes
+		# $j == the faulty line number so we can see what is actually happening there
+		# 	if($j == 576673 || $j == 683784 || $j == 733447)
+		# 		{
+		# 		print OUT "Line: $. \n";
+		# 		print OUT "VCF: $vchr $vpos $cons $consQual \n";
+		# 		print OUT "PILEUP: $chr $pos $ref $depth $baseString \n";
+		# 		print OUT "snp: $snp \n";
+		# 		print OUT "assigned: $snps{$chr}{$pos}{'snp'} \n";
+		# 		$i++;
+		# 		}
+
+		# 	print OK "Line: $. \n";
+		# 	print OK "VCF: $vchr $vpos $cons $consQual \n";
+		# 	print OK "PILEUP: $chr $pos $ref $depth $baseString \n";
+		# 	print OK "snp: $snp \n";
+		# 	print OK "assigned: $snps{$chr}{$pos}{'snp'} \n";
+			
+		# 	if ($i == 3)
+		# 	{
+		# 		close(OUT);
+		# 		close(OK);
+		# 	}
+
 			my $snpCount;
 			if ($snps{$chr}{$pos}{'snp'} eq 'A') {
 				$snpCount = $baseString =~ tr/Aa/Aa/;



More information about the Patchwork-commits mailing list