Skip to content

Instantly share code, notes, and snippets.

@rosdyana
Last active June 8, 2017 07:32
Show Gist options
  • Save rosdyana/f7cb194c9e71e4cb7699e57f99326178 to your computer and use it in GitHub Desktop.
Save rosdyana/f7cb194c9e71e4cb7699e57f99326178 to your computer and use it in GitHub Desktop.
generate 5 gram
require(data.table)
amino = c("A","R","N","D","C","Q","E","G","H","I","L","K","M","F","P","S","T","W","Y","V")
df_total = data.frame()
for(a in amino){
for(b in amino){
for(c in amino){
for(d in amino){
for(e in amino){
model <- paste0(a,b,c,d,e, sep="")
df <- data.frame(model)
fwrite(df, "fifthgram.csv",sep = ",", append = T, col.names = F, row.names = F)
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment