Skip to content

Commit 05d4062

Browse files
author
raim
committed
cleaned codon frequencies
1 parent a064aa5 commit 05d4062

File tree

2 files changed

+8
-27
lines changed

2 files changed

+8
-27
lines changed

genome_annotation/annotation.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ up.file <- file.path(mam.path,"originalData",
3737

3838

3939
## OUTPUT FILE
40-
feature.file <- file.path(mam.path,"features_GRCh38.110.tsv")
40+
feature.file <- file.path(mam.path, "features_GRCh38.110.tsv")
4141

4242
fig.path <- file.path(mam.path,"processedData","annotation")
4343
dir.create(fig.path, showWarnings=FALSE)

genome_annotation/codon_frequency.R

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,21 @@ library(coRdon)
66

77
## codon frequency from generated coding region fasta
88
mam.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+
1012
out.file <- sub("\\.fa", "_codons.tsv", transcr)
13+
14+
## read transcripts fasta
1115
seq <- readSet(file=transcr)
16+
## generate codon table
1217
cod <- codonTable(seq)
1318

1419
cc <- codonCounts(cod)
1520
rownames(cc) <- sub(",.*", "", names(seq))
1621

22+
## write out global codon frequencies
1723
out <- cbind.data.frame(ID=rownames(cc), cc)
1824
write.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

Comments
 (0)