-
Notifications
You must be signed in to change notification settings - Fork 9
Problem set 11 Bruzzese + Inskeep +Nemera #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bruzecruise
wants to merge
13
commits into
lyy005:master
Choose a base branch
from
bruzecruise:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
eaf1101
Made Python script, added pseudocode for Q1
kinskeep a630659
problem2.py file
0318b69
added Q2 pseudocode
kinskeep 872de04
Merge branch 'master' of https://github.com/omegadan01/Intro_Biocom_N…
kinskeep 1213eac
Creates alignments and HMMs, searches each protein type in bacterial …
kinskeep ea4ecd7
made line strip!
f5b303a
2 cloooooose!
bd6b908
Everything up to making file is working
kinskeep c138ba2
Merge branch 'master' of https://github.com/omegadan01/Intro_Biocom_N…
kinskeep 6c4fa71
FINISED QUESTION 2
446f643
finished problem 1 script
MatiNem 0d81def
changed python for problem 1 a little
MatiNem f776ba7
Caught a mistake I made in question 2, it now works
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,16 @@ | ||
| for i in *ref | ||
| do | ||
| ../../../../muscle.exe -in $i -out $i.aln | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmbuild $i.hmm $i.aln | ||
| done | ||
|
|
||
|
|
||
| for i in *fasta | ||
| do | ||
| /home/Mati/hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout $i.sigma.hits sigma.ref.hmm $i | ||
| /home/Mati/hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout $i.sporecoat.hits sporecoat.ref.hmm $i | ||
| /home/Mati/hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout $i.transporter.hits transporter.ref.hmm $i | ||
| done | ||
|
|
||
| cat *.hits | grep "tr|" | sed -E 's/[tr|A-Z0-9]+\_9//' | awk '{print $1 " " $3 " " $5}' > bacteriahmmout.txt | ||
|
|
||
This file contains hidden or 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,14 @@ | ||
| ###Question 1### | ||
|
|
||
| for i in *ref | ||
| do | ||
| ../../../../muscle.exe -in $i -out $i.aln | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmbuild $i.hmm $i.aln | ||
| done | ||
|
|
||
| for i in *fasta | ||
| do | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout $i.sigma.hits sigma.ref.hmm $i | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout $i.sporecoat.hits sporecoat.ref.hmm $i | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout $i.transporter.hits transporter.ref.hmm $i | ||
| done |
This file contains hidden or 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,14 @@ | ||
| ###Question 1### | ||
|
|
||
| for i in *ref | ||
| do | ||
| ../../../../muscle.exe -in $i -out $i.aln | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmbuild $i.hmm $i.align | ||
| done | ||
|
|
||
| for i in *fasta | ||
| do | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout sigma.hits sigma.hmm $i | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout sporecoat.hits sporecoat.hmm $i | ||
| ../../../../hmmer-3.1b2-cygwin64/binaries/hmmsearch --tblout transporter.hits transporter.hmm $i | ||
| done |
This file contains hidden or 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,51 @@ | ||
| import re | ||
| # unzip files in unix | ||
| # open fastafile | ||
| thefile=open('./Exercise11_files/Problem2/motifsort.fasta',"r") | ||
|
|
||
| # search strings | ||
| Motif1= r'AKKPRVZE' | ||
| Motif2 = r'AAQWWRNYGG' | ||
|
|
||
| # lists! | ||
| m1_id = [] | ||
| m1_seq = [] | ||
|
|
||
| m2_id = [] | ||
| m2_seq = [] | ||
|
|
||
| other_id = [] | ||
| other_seq = [] | ||
|
|
||
| # loop over the file | ||
| for line in thefile: | ||
| line = line.strip() | ||
| if ">" in line: | ||
| seqid = line | ||
| elif re.search(Motif1, line): | ||
| m1 = line | ||
| m1_id.append(seqid) | ||
| m1_seq.append(m1) | ||
| elif re.search(Motif2, line): | ||
| m2 = line | ||
| m2_id.append(seqid) | ||
| m2_seq.append(m2) | ||
| else: | ||
| other_id.append(seqid) | ||
| other_seq.append(line) | ||
|
|
||
| # write fasta files from lists :) | ||
| ofile = open("m1_motif.txt", "w") | ||
| for i in range(len(m1_id)): | ||
| ofile.write(m1_id[i] + "\n" +m1_seq[i] + "\n") | ||
| ofile.close() | ||
|
|
||
| ofile = open("m2_motif.txt", "w") | ||
| for i in range(len(m2_id)): | ||
| ofile.write(m2_id[i] + "\n" +m2_seq[i] + "\n") | ||
| ofile.close() | ||
|
|
||
| ofile = open("other.txt", "w") | ||
| for i in range(len(other_id)): | ||
| ofile.write(other_id[i] + "\n" +other_seq[i] + "\n") | ||
| ofile.close() | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good job |
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good