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
17 changes: 17 additions & 0 deletions tutorial11part1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
./Muscle -in ./Problem1/sigma.ref -out sigma.align
./Hammer/binaries/hmmbuild sigma.hmm sigma.align

./Muscle -in ./Problem1/sporecoat.ref -out sporecoat.align
./Hammer/binaries/hmmbuild sporecoat.hmm sporecoat.align

./Muscle -in ./Problem1/transporter.ref -out transporter.align
./Hammer/binaries/hmmbuild transporter.hmm transporter.align

for file in Problem1/*.fasta
do
./Hammer/binaries/hmmsearch --tblout $file.sigma.hits sigma.hmm $file
./Hammer/binaries/hmmsearch --tblout $file.sporecoat.hits sporecoat.hmm $file
./Hammer/binaries/hmmsearch --tblout $file.transporter.hits transporter.hmm $file
done

cat Problem1/*.hits | grep -v "#" | awk '{print $1,$3,$5}' | sed -E 's/tr\|[A-Z0-9]+\|[A-Z0-9]+_9//' > results.txt

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

22 changes: 22 additions & 0 deletions tutorial11part2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import numpy
import pandas

sequences=open("motifsort.fasta","r")
motif1file=open(motif1.txt,"w")
motif2file=open(motif2.txt,"w")

@lyy005 lyy005 Dec 11, 2017

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

motif1file=open("motif1.txt","w")
motif2file=open("motif2.txt","w")
others=open("nonMotif.txt","w")

others=open(nonMotif.txt,"w")

for line in sequences:
motif1= re.match(AKKPRVZE,str(sequences))
motif2- re.match(AAQWWRNYGG,str(sequences))

@lyy005 lyy005 Dec 11, 2017

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

motif1= re.match("AKKPRVZE",str(line))
motif2= re.match("AAQWWRNYGG",str(line))

-0.1 pts


if motif1:
motif1file.write(line + '\n')
if motif2:
motif2file.write(line + '\n')
else:
others.write(line + '\n')

print motif1file
print motif2file
print others