Hi all! I need your help with an R package named RAPIDR. I'm new to use this package, but I really need it, but I don't know how I can perform my analysis without errors. Now I explain my steps.
1) I create a binned file with the following code:
2) I create a reference with the following code:
But I receive this error:
The BAM files is from 2 male and 2 female, without aneuplodies and they come from ION Torrent, but I used the fastq file and re-alignd with bowtie2, and coverted into sorted-bam file with samtools.
Why I receive this error? How can I perform the analysis? Is there anyone who have some experience with this package and can help me?
Thank you
1) I create a binned file with the following code:
Code:
> makeBinnedCountsFile(bam.file.list=c(bam1.bam, bam2.bam,bam3.bam,bam4.bam), sampleIDs=c("001", "003", "005", "013"), binned.counts.fname="output.csv", k=20000)
Code:
> rapidr.dir<-system.file(package="RAPIDR") > data(outcomes) > data(gcContent) > T21.pos<-which(outcomes$Dx=="T21") > chr.lens<-sapply(gcContent, length) > chr.names<-names(chr.lens) > header<-c("SampleID") > for(i in 1:length(chr.lens)){ + header<-c(header,rep(chr.names[i], chr.lens[i]))} > nbins<-sum(chr.lens) > ncols<-nbins+1 > binned.counts<-matrix(nrow=nrow(outcomes), ncol=ncols) > for(i in 1:nrow(binned.counts)){ + binned.counts[i,]<-rpois(ncols, lambda=100) + if(i%in%T21.pos){ + binned.counts[i,139087:141493]<-rpois(chr.lens[21], lambda=115) + }} > binned.counts[,1]<-outcomes$SampleID > colnames(binned.counts)<-header > t<-tempfile() > write.table(binned.counts, file=t, col.names=TRUE, row.names=FALSE, quote=FALSE, sep=",") > "output.csv"<-t > message(t) /tmp/RtmpwrkRt5/file33292c2c486 > gcContent.fname<-paste(rapidr.dir, "/media/martina/VERBATIM HD/Altamedica/RAPIDR_0.1.1/RAPIDR/data/gcContent.rda", sep="") > head(outcomes) SampleID Dx Gender 1 1000 Normal Female 2 1001 Normal Female 3 1002 T21 Female 4 1003 Normal Male 5 1004 Normal Male 6 1005 Normal Male > ref.set<-createReferenceSetFromCounts("/media/martina/VERBATIM HD/risultati/output.csv", outcomes, gcCorrect=FALSE, PCA=FALSE, filterBin=FALSE, gcContentFile=gcContent.fname)
Code:
Loading binned counts file Checking every sampleID has an outcome No outcomes for Sample 001 No outcomes for Sample 003 No outcomes for Sample 005 No outcomes for Sample 013 Error in `[.data.frame`(sampleIDs.with.outcomes, , "Gender") : undefined columns selected
The BAM files is from 2 male and 2 female, without aneuplodies and they come from ION Torrent, but I used the fastq file and re-alignd with bowtie2, and coverted into sorted-bam file with samtools.
Why I receive this error? How can I perform the analysis? Is there anyone who have some experience with this package and can help me?
Thank you
Comment