Editing
Daniel:Notebook/Haplotyping/SISSORPipeline/2014-12-3
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===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.
Summary:
Please note that all contributions to ZhangLabWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
ZhangLabWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main Page
Current events
Recent changes
Random page
Investigators
Matt Cai
Song Chen
Eric Chu
Dinh Diep
Elizabeth Duong
Shicheng Guo
Alan Fung
Daniel Jacobsen
Blue Lake
Huy Lam
Alice Li
Andrew Richards
Brandon Sos
Chris Wei
Yan Wu
Kun Zhang
Tools
What links here
Related changes
Special pages
Page information