Skip to content

Commit

Permalink
Merge pull request #175 from DennisSchmitz/dev
Browse files Browse the repository at this point in the history
fix bowtie2 dependency error
  • Loading branch information
florianzwagemaker committed Jun 4, 2021
2 parents 77422ff + b044d52 commit dd276f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion bin/envs/HuGo_removal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ channels:
- conda-forge
- defaults
dependencies:
- bowtie2==2.3.4.3
- bowtie2==2.3.5
- tbb==2020.3
- samtools==1.9
- bedtools==2.27.1
- minimap2==2.17
15 changes: 9 additions & 6 deletions bin/scripts/Consensus.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def BuildIndex(bam, fasta):
for rec in pysamstats.stat_pileup(
type="variation",
alignmentfile=bam,
stepper="nofilter",
fafile=fasta,
pad=True,
one_based=True,
Expand Down Expand Up @@ -178,9 +179,10 @@ def Inside_an_ORF(location, GFFindex):
def BeyondStopCodon(location, gffindex, currentseq):

seqstring = "".join(currentseq)

stopcodons = ["TAG", "TAA", "TGA"]
stopcounter = []

def GFF_start_end(location, GFFindex):
for index, orf in GFFindex.iterrows():
in_orf = location in range(orf.start, orf.end)
Expand All @@ -190,7 +192,7 @@ def GFF_start_end(location, GFFindex):
return orf.start

def ORFsequence(startloc, seqstring):
orfseq = seqstring[startloc-1:].upper()
orfseq = seqstring[startloc - 1 :].upper()
orfseq = orfseq[orfseq.find("ATG") :]
return orfseq

Expand All @@ -202,12 +204,13 @@ def split_to_codons(seq, num):
)
for i in stopcodons:
stopcounter.append(codons.count(i))

if any(stopcounter) > 0:
return True
else:
return False


def slices(mintwo, minone, zero, plusone, plustwo):
dist_mintwo = {
"A": mintwo[1],
Expand Down Expand Up @@ -440,12 +443,12 @@ def BuildCons(pileupindex, IndexedGFF, mincov, bam):
if Within_ORF == False:
corrected_cons.append("-")
elif Within_ORF == True:

if BeyondStopCodon(currentloc, IndexedGFF, corrected_cons) is True:
corrected_cons.append("-")

if BeyondStopCodon(currentloc, IndexedGFF, corrected_cons) is False:

is_del = False

# In het geval er een deletie is gerapporteerd als meerderheid op de "currentposition"
Expand Down

0 comments on commit dd276f8

Please sign in to comment.