-
Notifications
You must be signed in to change notification settings - Fork 6
Wang_Serene_Exercise11_Submission #4
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
Lindsayeg
wants to merge
7
commits into
araiho:master
Choose a base branch
from
Lindsayeg: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
7 commits
Select commit
Hold shift + click to select a range
c3d253e
Added Problem 2
mwang9-nd c30d1bc
Exercise 1 in progress
723562d
Exercise1.sh
215e701
Excerise 11 script with problem 1 added
0dbfdbc
Exercise 11 Question 1 update
fe7e78e
Excercise 11 with corrected question 1
214e553
Delete Exercise1.sh
Lindsayeg 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,180 @@ | ||
| ####QUESTION1#### | ||
|
|
||
|
|
||
| ###Align reference sequence files using muscle either format below is okay! Repeat alignment for all files. | ||
|
|
||
| #Sigma | ||
| /Users/lou/Desktop/muscle3.8.31_i86darwin64 -in sigma.ref -out sigma.align | ||
|
|
||
| #transporter reference | ||
| /Users/lou/Desktop/muscle3.8.31_i86darwin64 -in transporter.ref -out transporter.align | ||
|
|
||
| #sporecoat | ||
| /Users/lou/Desktop/muscle3.8.31_i86darwin64 -in sporecoat.ref -out sporecoat.align | ||
|
|
||
|
|
||
| ###Build a profile HMM using alignment sequences and hmmbuild. | ||
|
|
||
| #Sigma | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmbuild sigma.hmm sigma.align | ||
|
|
||
| #transporter reference | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmbuild transporter.hmm transporter.align | ||
|
|
||
| #sporecoat | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmbuild sporecoat.hmm sporecoat.align | ||
|
|
||
|
|
||
| ###Search each proteome for sigma factors using hmmsearch. | ||
|
|
||
| #Arthrobacter | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sigma.hmm Arthrobacter.fasta | ||
| cat Results.txt >> All_Sigma_Results.txt | ||
|
|
||
| #Bacillus | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sigma.hmm Bacillus.fasta | ||
| cat Results.txt >> All_Sigma_Results.txt | ||
|
|
||
| #Clostridium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout cat Results.txt sigma.hmm Clostridium.fasta | ||
| cat Results.txt >> All_Sigma_Results.txt | ||
|
|
||
| #Flavobacterium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sigma.hmm Flavobacterium.fasta | ||
| cat Results.txt >> All_Sigma_Results.txt | ||
|
|
||
| #Limnohabitans | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sigma.hmm Limnohabitans.fasta | ||
| cat Results.txt >> All_Sigma_Results.txt | ||
|
|
||
| #Rhizobium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sigma.hmm Rhizobium.fasta | ||
| cat Results.txt >> All_Sigma_Results.txt | ||
|
|
||
| #Roseobacter | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sigma.hmm Roseobacter.fasta | ||
| cat Results.txt >> All_Sigma_Results.txt | ||
|
|
||
| #Verrucomicrobia | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sigma.hmm Verrucomicrobia.fasta | ||
| cat Results.txt >> All_Sigma_Results.txt | ||
|
|
||
|
|
||
| ###Search each proteome for transporter using hmmsearch. | ||
|
|
||
| #Arthrobacter | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt transporter.hmm Arthrobacter.fasta | ||
| cat Results.txt >> All_Transporter_Results.txt | ||
|
|
||
| #Bacillus | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Bacillus.txt transporter.hmm Bacillus.fasta | ||
| cat Results.txt >> All_Transporter_Results.txt | ||
|
|
||
| #Clostridium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt transporter.hmm Clostridium.fasta | ||
| cat Results.txt >> All_Transporter_Results.txt | ||
|
|
||
| #Flavobacterium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt transporter.hmm Flavobacterium.fasta | ||
| cat Results.txt >> All_Transporter_Results.txt | ||
|
|
||
| #Limnohabitans | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Limnohabitans.txt transporter.hmm Limnohabitans.fasta | ||
| cat Results.txt >> All_Transporter_Results.txt | ||
|
|
||
| #Rhizobium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt transporter.hmm Rhizobium.fasta | ||
| cat Results.txt >> All_Transporter_Results.txt | ||
|
|
||
| #Roseobacter | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt transporter.hmm Roseobacter.fasta | ||
| cat Results.txt >> All_Transporter_Results.txt | ||
|
|
||
| #Verrucomicrobia | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt transporter.hmm Verrucomicrobia.fasta | ||
| cat Results.txt >> All_Transporter_Results.txt | ||
|
|
||
|
|
||
| ###Search each proteome for sporecoat using hmmsearch. | ||
|
|
||
| #Arthrobacter | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sporecoat.hmm Arthrobacter.fasta | ||
| cat Results.txt >> All_Sporecoat_Results.txt | ||
|
|
||
| #Bacillus | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sporecoat.hmm Bacillus.fasta | ||
| cat Results.txt >> All_Sporecoat_Results.txt | ||
|
|
||
| #Clostridium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sporecoat.hmm Clostridium.fasta | ||
| cat Results.txt >> All_Sporecoat_Results.txt | ||
|
|
||
| #Flavobacterium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sporecoat.hmm Flavobacterium.fasta | ||
| cat Results.txt >> All_Sporecoat_Results.txt | ||
|
|
||
| #Limnohabitans | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sporecoat.hmm Limnohabitans.fasta | ||
| cat Results.txt >> All_Sporecoat_Results.txt | ||
|
|
||
| #Rhizobium | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sporecoat.hmm Rhizobium.fasta | ||
| cat Results.txt >> All_Sporecoat_Results.txt | ||
|
|
||
| #Roseobacter | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sporecoat.hmm Roseobacter.fasta | ||
| cat Results.txt >> All_Sporecoat_Results.txt | ||
|
|
||
| #Verrucomicrobia | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt sporecoat.hmm Verrucomicrobia.fasta | ||
| cat Results.txt >> All_Sporecoat_Results.txt | ||
|
|
||
|
|
||
| #Combine the three results files in one file called ALL_Results.txt | ||
| cat All_Sigma_Results.txt >> ALL_Results.txt | ||
| cat All_Transporter_Results.txt >> ALL_Results.txt | ||
| cat All_Sporecoat_Results.txt >> ALL_Results.txt | ||
|
|
||
| #Remove comments and put into a new file called ALL1.txt | ||
| grep -v '[#]' ALL_Results.txt>ALL1.txt | ||
|
|
||
| #Cut out rows 1, 3, and 5 and put into a new file called ALL2.txt | ||
| awk '{print $1,$3,$5}' ALL1.txt > ALL2.txt | ||
|
|
||
| #Trim first colmun contents and put into new file called FinalResults.txt | ||
| sed -E 's/tr\|[A-Z0-9]+\|[A-Z0-9]+_9//g' ALL2.txt >> FinalResults.txt | ||
|
|
||
|
|
||
|
|
||
|
|
||
| ## Problem 2 | ||
|
|
||
| # Set working Directory | ||
| setwd("C:/Users/Michelle Wang/Desktop/BIOS 60318/Intro_Biocomp_ND_317_Tutorial11/Exercise11_files/Problem2/") | ||
|
|
||
| # Load Libraries | ||
| library(stringr) | ||
|
|
||
| # Scan file into vector | ||
| data = scan(file = "motifsort.fasta",sep="\t", what = character()) | ||
|
|
||
| # Search for sequence and write to new file | ||
| for(i in 2:length(data)){ | ||
| # Separate sequence ID | ||
| if (str_detect(data[i-1],">")=='TRUE'){ | ||
| seq = data[i-1] | ||
| } | ||
| else if (str_detect(data[i],"(AKKPRVZE)")=='TRUE'){ | ||
| write(seq, file = "motif1", append = TRUE) | ||
| write(data[i], file = "motif1", append = TRUE) | ||
| } | ||
| else if (str_detect(data[i],"(AAQWWRNYGG)")=='TRUE'){ | ||
| write(seq, file = "motif2", append = TRUE) | ||
| write(data[i], file = "motif2", append = TRUE) | ||
| } | ||
| else { | ||
| write(seq, file = "other", append = TRUE) | ||
| write(data[i], file = "other", append = TRUE) | ||
| } | ||
| } | ||
|
|
||
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,28 @@ | ||
| ###Align reference sequence files using muscle either format below is okay! Repeat alignment for all files. | ||
|
|
||
| #Sigma | ||
| /Users/lou/Desktop/muscle3.8.31_i86darwin64 -in sigma.ref -out sigma.align | ||
|
|
||
| #transporter reference | ||
| /Users/lou/Desktop/muscle3.8.31_i86darwin64 -in transporter.ref -out transporter.align | ||
|
|
||
| #sporecoat | ||
| /Users/lou/Desktop/muscle3.8.31_i86darwin64 -in sporecoat.ref -out sporecoat.align | ||
|
|
||
|
|
||
| ###Build a profile HMM using alignment sequences and hmmbuild. | ||
|
|
||
| #Sigma | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmbuild sigma.hmm sigma.align | ||
|
|
||
| #transporter reference | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmbuild transporter.hmm transporter.align | ||
|
|
||
| #sporecoat | ||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmbuild sporecoat.hmm sporecoat.align | ||
|
|
||
|
|
||
| ###Search each proteome for sigma factors using hmmsearch. | ||
|
|
||
| /Users/lou/Desktop/hmmer-3.1b2-macosx-intel/binaries/hmmsearch --tblout Results.txt $2 $1 | ||
| cat Results.txt >> All_Results.txt |
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.
should be in a .R file