Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
james
committed
Dec 7, 2013
1 parent
6eb01e6
commit b3d3e32
Showing
17 changed files
with
119 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
PB Correction and other PB tools | ||
|
||
Requires: BioPython | ||
|
||
PBTOOLS_HOME=/path/to/this/directory | ||
|
||
Running Correction. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys | ||
import os | ||
|
||
|
||
### | ||
#Assume ref is now in the cwd | ||
### | ||
|
||
|
||
if not len(sys.argv) == 2: | ||
print "fix_delta_header.py file.delta" | ||
sys.exit(1) | ||
|
||
cwd = os.getcwd() | ||
|
||
|
||
fname = sys.argv[1] | ||
ftmp = sys.argv[1]+".copy_tmp_new" | ||
|
||
print "%s" % fname | ||
|
||
with open(fname) as dfile: | ||
with open(ftmp,"w") as tmp: | ||
ref,query = dfile.readline().split() | ||
new_ref = os.path.join(cwd,os.path.basename(ref)) | ||
tmp.write(" ".join([new_ref, query]) +"\n") | ||
for line in dfile: | ||
tmp.write(line) | ||
|
||
os.rename(ftmp, fname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fl | ||
cd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ca | ||
asdf | ||
asdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
>ff | ||
ddadd | ||
>c | ||
>d | ||
>f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@acg | ||
ffffffffff | ||
+ | ||
FFFFFFFFFF | ||
@ | ||
fff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
>good | ||
CACACACA | ||
>dddd | ||
CCCCCCCCC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@good | ||
ccccccccc | ||
+ | ||
ddddddddd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import sys | ||
|
||
sys.path.append('..') | ||
|
||
from seqio import fastaIterator, fastqIterator, seqIterator | ||
|
||
for i in ["bad.fa","corrupt.fa","good.fa"]: | ||
with open(i) as fh: | ||
try: | ||
for record in fastaIterator(fh): | ||
print record.name | ||
print record.seq | ||
except Exception as e: | ||
print e | ||
|
||
for i in ["bad.fq","corrupt.fq","good.fq"]: | ||
with open(i) as fh: | ||
try: | ||
for record in fastqIterator(fh): | ||
print record.name | ||
print record.seq | ||
print record.desc | ||
print record.qual | ||
except Exception as e: | ||
print e | ||
|
||
|
||
|