get-protein-lengths.R

# Determines the lengths of all proteins in the human proteome.

library( seqinr )

x <- read.fasta("proteome/UP000005640_9606.fasta.gz", 
				forceDNAtolower=FALSE, as.string=TRUE )

for( i in seq_along(x) ){
	xn <- strsplit(attr(x[[i]],'name'),"\\|")[[1]][2]
	cat(xn," ",nchar(x[[i]]),"\n",sep="")
}
richelbilderbeek/bianchi_et_al_2017 documentation built on Jan. 4, 2023, 1:36 a.m.