problem in biophysconnector package
0
0
Entering edit mode
Angel ▴ 40
@angel-7981
Last seen 8.0 years ago
Berlin

hi,

sorry what does this error mean pleas? i was going to binning the reads mapped on the genes by biophysconnector.

i have a ribo-seq bed file from tophat2 contains the gene IDS and start and end, a gene ids file from rna-seq and gene ids file from ribo-seq..i should first calculate the reads mapped on each gene then normalized the binned reads based on mapped reads from rna-seq...

but in the first step i got error

i shared my data...https://drive.google.com/drive/folders/0BwOX04QQkaXTM1lvS3N4THQyd3M

#input file containing the yeast gene IDs and length
genes <- as.data.frame(read.csv("geneID and length.txt",header = FALSE, sep=","),stringsAsFactors=FALSE)
genesID <- genes[,1]
geneslength <- genes[,2]
# building a matrix of footprint number
binwidth=100
#bed file containing the gene IDs and start and end of mapping
bed_table_FP <- as.data.frame(read.csv("footprint.bed",header = FALSE, sep="\t",stringsAsFactors=FALSE))
# creating a table containing the number of reads mapped on each genes
reads_table_FP <- as.data.frame(table(bed_table_FP[,1]))
# creating a table containing the number of reads mapped on each genes
GENES_COL <- as.vector(reads_table_FP[,1])
COUNTS_COL <- as.vector(reads_table_FP[,2])
MATRS <- cbind(GENES_COL, COUNTS_COL)
# ramp elimination, Consider only the rows that have the bed_table_FP column 3> 60
pos <-which(bed_table_FP[,3]>60)                                                                #####
bed_table_FP_new <- as.data.frame(bed_table_FP[pos,])    
# Create a new readstable based on the new bed_table
reads_table_FP_new <- as.data.frame(table(bed_table_FP_new[,1]))            
#Create Matrix with the count of reads mapping on each gene consider reads_table_FP_new
GENES_COL <- as.vector(reads_table_FP[,1])
COUNTS_COL <- as.vector(reads_table_FP[,2])
MATRS <- cbind(GENES_COL, COUNTS_COL)
#Create matrix that contains an ORF for each row and for each column that contains the count of reads that are in a window of n nucleotides
n=binwidth
MATRS_new_1 <- matrix(nrow=length(GENES_COL), ncol=(as.integer(max(geneslength)/n)+1))

Error in Summary.factor(c(1368L, 115L, 53L, 1135L, 1317L, 776L, 593L,  : 
  ‘max’ not meaningful for factors

software error • 1.1k views
ADD COMMENT
0
Entering edit mode
biophysconnector is not a Bioconductor package, so you should ask its maintainer for help.
ADD REPLY

Login before adding your answer.

Traffic: 579 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