[Patchwork-commits] r161 - .git .git/logs .git/logs/refs/heads .git/logs/refs/remotes/origin .git/refs/heads .git/refs/remotes/origin pkg/patchwork/inst/perl pkg/patchwork/inst/python

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Feb 13 14:14:27 CET 2013


Author: sebastian_d
Date: 2013-02-13 14:14:27 +0100 (Wed, 13 Feb 2013)
New Revision: 161

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/inst/perl/pile2alleles.pl
   pkg/patchwork/inst/python/Pysamloader.py
Log:
Updated error handling for pile2alleles

Modified: .git/COMMIT_EDITMSG
===================================================================
--- .git/COMMIT_EDITMSG	2013-01-31 11:22:11 UTC (rev 160)
+++ .git/COMMIT_EDITMSG	2013-02-13 13:14:27 UTC (rev 161)
@@ -1 +1 @@
-updates size of cex for karyotype plot to make the small pictures more interpretable
+Updated error handling in pile2alleles

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

Modified: .git/logs/HEAD
===================================================================
--- .git/logs/HEAD	2013-01-31 11:22:11 UTC (rev 160)
+++ .git/logs/HEAD	2013-02-13 13:14:27 UTC (rev 161)
@@ -28,3 +28,5 @@
 c39f1b06a56367684e8062040df7214da6a79455 8d49ce11a9941d73d7be44948f908a139958e029 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1358776614 +0100	commit: minor update
 8d49ce11a9941d73d7be44948f908a139958e029 4577fee5ce0968b311fa252e9df8fba284522e5d Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1358869240 +0100	commit: removed antique from bugfixing in patchworkCG
 4577fee5ce0968b311fa252e9df8fba284522e5d a75b0350402a356de4d9991f66d7fd1bc785a46f Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1359037334 +0100	commit: updates size of cex for karyotype plot to make the small pictures more interpretable
+a75b0350402a356de4d9991f66d7fd1bc785a46f acd7e59391651e7076a021090d6020f57da24098 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1359631509 +0100	commit: removed vercheck as it caused package to fail to build at R-forge
+acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360761388 +0100	commit: Updated error handling in pile2alleles

Modified: .git/logs/refs/heads/master
===================================================================
--- .git/logs/refs/heads/master	2013-01-31 11:22:11 UTC (rev 160)
+++ .git/logs/refs/heads/master	2013-02-13 13:14:27 UTC (rev 161)
@@ -28,3 +28,5 @@
 c39f1b06a56367684e8062040df7214da6a79455 8d49ce11a9941d73d7be44948f908a139958e029 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1358776614 +0100	commit: minor update
 8d49ce11a9941d73d7be44948f908a139958e029 4577fee5ce0968b311fa252e9df8fba284522e5d Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1358869240 +0100	commit: removed antique from bugfixing in patchworkCG
 4577fee5ce0968b311fa252e9df8fba284522e5d a75b0350402a356de4d9991f66d7fd1bc785a46f Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1359037334 +0100	commit: updates size of cex for karyotype plot to make the small pictures more interpretable
+a75b0350402a356de4d9991f66d7fd1bc785a46f acd7e59391651e7076a021090d6020f57da24098 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1359631509 +0100	commit: removed vercheck as it caused package to fail to build at R-forge
+acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360761388 +0100	commit: Updated error handling in pile2alleles

Modified: .git/logs/refs/remotes/origin/master
===================================================================
--- .git/logs/refs/remotes/origin/master	2013-01-31 11:22:11 UTC (rev 160)
+++ .git/logs/refs/remotes/origin/master	2013-02-13 13:14:27 UTC (rev 161)
@@ -28,3 +28,5 @@
 c39f1b06a56367684e8062040df7214da6a79455 8d49ce11a9941d73d7be44948f908a139958e029 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1358776628 +0100	update by push
 8d49ce11a9941d73d7be44948f908a139958e029 4577fee5ce0968b311fa252e9df8fba284522e5d Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1358869254 +0100	update by push
 4577fee5ce0968b311fa252e9df8fba284522e5d a75b0350402a356de4d9991f66d7fd1bc785a46f Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1359037348 +0100	update by push
+a75b0350402a356de4d9991f66d7fd1bc785a46f acd7e59391651e7076a021090d6020f57da24098 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1359631524 +0100	update by push
+acd7e59391651e7076a021090d6020f57da24098 f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0 Sebastian DiLorenzo <dilorenzo.sebastian at gmail.com> 1360761405 +0100	update by push

Modified: .git/refs/heads/master
===================================================================
--- .git/refs/heads/master	2013-01-31 11:22:11 UTC (rev 160)
+++ .git/refs/heads/master	2013-02-13 13:14:27 UTC (rev 161)
@@ -1 +1 @@
-a75b0350402a356de4d9991f66d7fd1bc785a46f
+f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0

Modified: .git/refs/remotes/origin/master
===================================================================
--- .git/refs/remotes/origin/master	2013-01-31 11:22:11 UTC (rev 160)
+++ .git/refs/remotes/origin/master	2013-02-13 13:14:27 UTC (rev 161)
@@ -1 +1 @@
-a75b0350402a356de4d9991f66d7fd1bc785a46f
+f2ab85a08717e4eea8a9deaf3d0d7770b28b40a0

Modified: pkg/patchwork/inst/perl/pile2alleles.pl
===================================================================
--- pkg/patchwork/inst/perl/pile2alleles.pl	2013-01-31 11:22:11 UTC (rev 160)
+++ pkg/patchwork/inst/perl/pile2alleles.pl	2013-02-13 13:14:27 UTC (rev 161)
@@ -32,44 +32,51 @@
 $iupac{'T'}{'S'} = 'G|C';
 $iupac{'T'}{'M'} = 'A|C';
 
-
 while (<STDIN>) {
 	chomp;
-	my ($chr, $pos, $ref, $cons, $consQual, $depth, $baseString) = (split /\t/, $_)[0,1,2,3,4,7,8];
-	$ref = uc $ref;
-	if ($ref eq '*'){next;}
-	if ($cons eq 'N'){next;}
-	my $snp = ($cons =~ m/[AGCT]/) ? $cons : $iupac{$ref}{$cons};
-	$snps{$chr}{$pos}{'ref'} = $ref;
-	$snps{$chr}{$pos}{'snp'} = $snp;
-	$snps{$chr}{$pos}{'qual'} = $consQual;
-	my $snpCount;
-	if ($snps{$chr}{$pos}{'snp'} eq 'A') {
-		$snpCount = $baseString =~ tr/Aa/Aa/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'C') {
-		$snpCount = $baseString =~ tr/Cc/Cc/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'G') {
-		$snpCount = $baseString =~ tr/Gg/Gg/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'T') {
-		$snpCount = $baseString =~ tr/Tt/Tt/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'A|C') {
-		$snpCount = $baseString =~ tr/AaCc/AaCc/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'A|G') {
-		$snpCount = $baseString =~ tr/AaGg/AaGg/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'A|T') {
-		$snpCount = $baseString =~ tr/AaTt/AaTt/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'G|C') {
-		$snpCount = $baseString =~ tr/GgCc/GgCc/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'G|T') {
-		$snpCount = $baseString =~ tr/GgTt/GgTt/;
-	} elsif ($snps{$chr}{$pos}{'snp'} eq 'C|T') {
-		$snpCount = $baseString =~ tr/CcTt/CcTt/;
-	} else {
-		$snpCount = 0;
+	#if ($_ == ""){next;}
+	if ($_ =~ /(\S+)\t(\S+)\t(\S+)\t(\S+)\t(\S+)\t\S+\t\S+\t(\S+)\t(\S+)\t\S+/)
+	{
+		my ($chr, $pos, $ref, $cons, $consQual, $depth, $baseString) = ($1,$2,$3,$4,$5,$6,$7); #(split /\t/, $_)[0,1,2,3,4,7,8];
+		$ref = uc $ref;
+		if ($ref eq '*'){next;}
+		if ($cons eq 'N'){next;}
+		my $snp = ($cons =~ m/[AGCT]/) ? $cons : $iupac{$ref}{$cons};
+		$snps{$chr}{$pos}{'ref'} = $ref;
+		$snps{$chr}{$pos}{'snp'} = $snp;
+		$snps{$chr}{$pos}{'qual'} = $consQual;
+		my $snpCount;
+		if ($snps{$chr}{$pos}{'snp'} eq 'A') {
+			$snpCount = $baseString =~ tr/Aa/Aa/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'C') {
+			$snpCount = $baseString =~ tr/Cc/Cc/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'G') {
+			$snpCount = $baseString =~ tr/Gg/Gg/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'T') {
+			$snpCount = $baseString =~ tr/Tt/Tt/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'A|C') {
+			$snpCount = $baseString =~ tr/AaCc/AaCc/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'A|G') {
+			$snpCount = $baseString =~ tr/AaGg/AaGg/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'A|T') {
+			$snpCount = $baseString =~ tr/AaTt/AaTt/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'G|C') {
+			$snpCount = $baseString =~ tr/GgCc/GgCc/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'G|T') {
+			$snpCount = $baseString =~ tr/GgTt/GgTt/;
+		} elsif ($snps{$chr}{$pos}{'snp'} eq 'C|T') {
+			$snpCount = $baseString =~ tr/CcTt/CcTt/;
+		} else {
+			$snpCount = 0;
+		}
+		$snps{$chr}{$pos}{'depth'} = $depth;
+		$snps{$chr}{$pos}{'freq'} = $snpCount;
+		$snps{$chr}{$pos}{'pct'} = sprintf '%.2f', ($snpCount/$depth);
+		}
+	else
+	{
+		print STDERR "Line incompatible: $_ \n";
 	}
-	$snps{$chr}{$pos}{'depth'} = $depth;
-	$snps{$chr}{$pos}{'freq'} = $snpCount;
-	$snps{$chr}{$pos}{'pct'} = sprintf '%.2f', ($snpCount/$depth);
 }
 
 

Modified: pkg/patchwork/inst/python/Pysamloader.py
===================================================================
--- pkg/patchwork/inst/python/Pysamloader.py	2013-01-31 11:22:11 UTC (rev 160)
+++ pkg/patchwork/inst/python/Pysamloader.py	2013-02-13 13:14:27 UTC (rev 161)
@@ -4,10 +4,12 @@
 
 import pysam
 
+filename = sys.argv[1]
+
 try:
     infile = pysam.Samfile(sys.argv[1],"rb")
 except IOError,eStr:
-    print "Error:Cannot open",infile," for reading: ", eStr
+    print "Error:Cannot open ",filename," for reading: ", eStr
     sys.exit()
     
 outfile = open(".Tmp_chr_pos","w")



More information about the Patchwork-commits mailing list