@@ -6,40 +6,21 @@ library(coRdon)
66
77# # codon frequency from generated coding region fasta
88mam.path <- Sys.getenv(" MAMDATA" )
9- transcr <- file.path(mam.path ," processedData" ," coding.fa" )# "Homo_sapiens.GRCh38.
9+
10+ transcr <- file.path(mam.path , " processedData" , " coding.fa" )
11+
1012out.file <- sub(" \\ .fa" , " _codons.tsv" , transcr )
13+
14+ # # read transcripts fasta
1115seq <- readSet(file = transcr )
16+ # # generate codon table
1217cod <- codonTable(seq )
1318
1419cc <- codonCounts(cod )
1520rownames(cc ) <- sub(" ,.*" , " " , names(seq ))
1621
22+ # # write out global codon frequencies
1723out <- cbind.data.frame(ID = rownames(cc ), cc )
1824write.table(out , file = out.file , sep = " \t " , row.names = FALSE , quote = FALSE )
1925
20- # # AA frequency
21-
22-
23- if ( FALSE ) {
24-
25- library(segmenTools )
26- # # test coRdon:
27-
28- dnaHD59 <- readSet(
29- file = " https://raw.githubusercontent.com/BioinfoHR/coRdon-examples/master/HD59.fasta"
30- )
31- HD59 <- codonTable(dnaHD59 )
32-
33- xlab <- " MILC distance from sample centroid"
34- ylab <- " MILC distance from ribosomal genes"
35- milc <- MILC(HD59 , ribosomal = TRUE )
36-
37- dense2d(milc [,1 ], milc [,2 ])
3826
39- genes <- getKO(HD59 )[getlen(HD59 ) > 80 ]
40-
41- subset <- list (half = c(rep(TRUE ,20 ), rep(FALSE ,length(seq )- 20 )))
42-
43- milc <- MILC(cod , self = FALSE ,
44- subsets = subset )
45- }
0 commit comments