Daniel:Notebook/Haplotyping/SISSORPipeline/2014-12-3

From ZhangLabWiki
Revision as of 22:32, 3 December 2014 by >Djacobse (→‎Reworking the Analysis Pipeline)
Jump to navigation Jump to search

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