Vendrely_Davis_Exe11#1
Conversation
araiho
left a comment
There was a problem hiding this comment.
Great job commenting things out and documenting the whole process. This submission was a little confusing because the answer for 1 is in a txt file and includes instructions not related to answering the question. But, it's still good to see the git hub workflow you use. 3.9/4
| other[a] <- fasta[list4-1] | ||
| other[b] <- fasta[list4] | ||
| } | ||
| write.table(other, "Exercise11_files/Problem2/other.txt") |
There was a problem hiding this comment.
Unique approach! Could also use:
library(stringr)
inFile=scan("motifsort.fasta",sep="\n",what=character())
motif1=file("motif1.fasta",open="w")
motif2=file("motif2.fasta",open="w")
other=file("nomotif.fasta",open="w")
for(i in 1:length(inFile)){
if(str_detect(inFile[i],">")){
seqID=inFile[i]
}else{
if(str_detect(inFile[i],"AKKPRVZE")){
writeLines(seqID,motif1)
writeLines(inFile[i],motif1)
}else if(str_detect(inFile[i],"AAQWWRNYGG")){
writeLines(seqID,motif2)
writeLines(inFile[i],motif2)
}else{
writeLines(seqID,other)
writeLines(inFile[i],other)
}
}
}
close(motif1)
close(motif2)
close(other)
| @@ -0,0 +1,61 @@ | |||
| #Question 1_Tutorial 11 | |||
There was a problem hiding this comment.
You're going to want some of this in a .sh file, so you can use it as an executable
No description provided.