Query regarding edgeR and limma
1
0
Entering edit mode
abhisek001 • 0
@6d5973d2
Last seen 29 days ago
India

Enter the body of text here

Code should be placed in three backticks as shown below

library(limma)
library(edgeR)
directory="/home/abhisek/Downloads/result analysis"
filess <- grep("a_gene_count_matrix.txt",list.files(directory), value = TRUE)
x <- readDGE(filess, columns=c(1,2),header=TRUE)
class(x)
dim(x)
# annotate the samples 
x$samples
#samplenames <- substring(colnames(x), 1, nchar(colnames(x)))
samplenames <- substring(colnames(x),1,2)
samplenames
colnames(x) <- samplenames
#make groups
group <- as.factor(c("CK", "CK", "CK", "LD", "LD", "LD", "MD", "MD", "MD"))
x$samples$group <- group

Question - I am working with the following .txt file which is a tab-separated file of the count of genes. but in sample annotation I can not get the name of the sample I think there is something problem in the reading of my data.

Gene count file is following -

Geneid CK1 CK2 CK3 LD1 LD2 LD3 MD1 MD2 MD3

TEA_000001 144 195 109 172 254 366 156 117 129

Output -

samplenames

[1] "a_"

limma readDGE edgeR • 635 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 9 hours ago
United States

Does this help explain your issue to you?

> z <- c("word", "anotherword", "ditto")
> substring(z, 1, 2)
[1] "wo" "an" "di"
ADD COMMENT

Login before adding your answer.

Traffic: 810 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6