Daniel:Notebook/Haplotyping/SISSORPipeline/2014-12-3: Difference between revisions

From ZhangLabWiki
Jump to navigation Jump to search
>Djacobse
(Created page with "=Segmentation Analysis Pipeline (Started 12/2/2014)= Back to Calendar ...")
 
>Djacobse
Line 11: Line 11:
This doesn't actually need reworking, but I'm having trouble running the command.
This doesn't actually need reworking, but I'm having trouble running the command.


'''Comand'''
'''Command'''
  python varbin.50k.sam.py pgp22_chamber1.BQSR.realigned.sam test.varbin50k.txt test.varbin50k.stats.txt
  python varbin.50k.sam.py pgp22_chamber1.BQSR.realigned.sam test.varbin50k.txt test.varbin50k.stats.txt


Line 22: Line 22:
  ZeroDivisionError: float division by zero  
  ZeroDivisionError: float division by zero  


  awk 'BEGIN {OFS = "\t"} $3 = "chr" $3' pgp22_chamber1.BQSR.realigned.sam > test.sam
I think the problem is the chromosomes in the script are named "chr1","chr2",etc., whereas the chromosomes in my file are named "1","2",etc.  This is a common problem I have run in to, and should be addressed.  This is an example command to append "chr" to the 3rd column (reference name column) of the output file.
 
  awk 'BEGIN {OFS = "\t"} $3 = "chr" $3' infile.sam > outfile.sam
 
Repeating the first command now produces a viable result.
 
===Step 2-Cutoff To Define Initial States===

Revision as of 22:32, 3 December 2014

Segmentation Analysis Pipeline (Started 12/2/2014)

Back to Calendar

Reworking the Analysis Pipeline

Looks like there are many steps to rework the pipeline. I'll start at the beginning.

Step 1-Python Script

This doesn't actually need reworking, but I'm having trouble running the command.

Command

python varbin.50k.sam.py pgp22_chamber1.BQSR.realigned.sam test.varbin50k.txt test.varbin50k.stats.txt

Result

Traceback (most recent call last):
 File "varbin.50k.sam.py", line 129, in <module>
   main()
 File "varbin.50k.sam.py", line 71, in main
   thisRatio = float(binCounts[i]) / (float(counter) / float(len(bins)))
ZeroDivisionError: float division by zero 

I think the problem is the chromosomes in the script are named "chr1","chr2",etc., whereas the chromosomes in my file are named "1","2",etc. This is a common problem I have run in to, and should be addressed. This is an example command to append "chr" to the 3rd column (reference name column) of the output file.

awk 'BEGIN {OFS = "\t"} $3 = "chr" $3' infile.sam > outfile.sam

Repeating the first command now produces a viable result.

Step 2-Cutoff To Define Initial States