Entering edit mode
4.8 years ago
Adeler001
•
0
Hello I am trying to use the Value Matching command in R to find a specific ensemble exon code in my exon count table generated by featurecounts for my RNAseq data . Everything works until I used the %in%
command. Here is the script I used:
tab= read.table("exons_RNA-seq_sorted.csv", header=F, sep="\t")
tab= tab[-c(1), ]
line1 = tab[1,]
line1b = as.matrix(line1)
colnames(tab) = line1b
tab= tab[-c(1), ]
tab = tab[tab$'ENSG00000223972.4'%in%'Geneid',]
printFilter(tab, 'variants in CTNNA1 for D4440')
tab=zzef1
Please provide example data, couple of rows from your file - exons_RNA-seq_sorted.csv.
Why not use
read.csv
and keep the headers?Where does
'Geneid'
come from, is it a variable, or a string?What packages are loaded -
printFilter
?Geneid is one of the column headers of my table. I didn't think of using the
read.csv
command. i didn't install any packages . i just tried theread.csv
command and i get this error message : Error in read.table(file = file, header = header, sep = sep, quote = quote, : more columns than column nameshere is what my table looks like
You have to check that the first column is of character type. I also post the link to a similar question on SO, where you can get further help.
So it is not a CSV file. Not sure what we are trying to do, if we are trying to subset based on Geneid value, then try this example: