Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Scripts/tepid-map
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ map () {
rm "${fname}.split.sam"

echo "Sorting alignment"
samtools sort -@ $proc "${fname}_unsort.bam" "${fname}"
samtools sort -@ $proc "${fname}_unsort.bam" -o "${fname}.bam"
rm "${fname}_unsort.bam"

echo "Indexing alignment"
Expand Down
8 changes: 6 additions & 2 deletions tepid/tepid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,7 @@ def discover_pe(options):
imput split reads bam file must be name sorted
TE annotation can be gzipped
"""

print "Processing "+options.name
print "Running paired-end mode"
print 'Estimating mean insert size and coverage'
Expand Down Expand Up @@ -1123,10 +1124,12 @@ def discover_pe(options):
remove_temp(options)


# Fix bug by adding "./" in argument of x.startswith
# otherwise the files in list temp are not matching
def remove_temp(options):
if options.keep is False:
temp = glob('./*.temp')
mytempfiles = [x for x in temp if x.startswith(options.prefix)]
mytempfiles = [x for x in temp if x.startswith("./"+options.prefix)]
for i in mytempfiles:
os.remove(i)
os.remove(options.prefix + 'disc_sorted.bam')
Expand Down Expand Up @@ -1155,6 +1158,7 @@ def discover_se(options):
"""
Single-end mode
"""

print "Processing "+options.name
print "Running single-end mode"
cov = calc_cov(options.conc, 100000, 120000)
Expand Down Expand Up @@ -1227,4 +1231,4 @@ def discover_se(options):
with open("tepid_discover_log_{}.txt".format(options.name), 'a') as logfile:
logfile.write("tepid-discover finished normally at {}\n".format(ctime()))

remove_temp(options)
remove_temp(options)