This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in RAPIDR package in R

Hello everyone,

I need some help regarding RAPIDR package in R.

when i run my command:-

makeBinnedCountsFile(bam.file.list = c("sample.bam", "sample1.bam"),sampleIDs = c("sample", "sample1"),binned.counts.fname = output.fname,  k = 20000, mask )

it gives error.

Binning counts in bam files
doing the binning
Error in value[[3L]](cond) : 
 failed to open BamFile: failed to load BAM index
  file: sample.bam
In addition: Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
  [bam_index_load] fail to load BAM index.

please solve this problem.

r

No i am totally new with this package. I think RAPIDR package automatically index the bam file using Rsamtool.

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

1 answer

Hii i am facing some errors in RAPIDR package when a run this command :-

ref.set <- createReferenceSetFromCounts("output.csv",outcomes,gcCorrect = FALSE,PCA = FALSE,filterBin = FALSE,gcContentFile = gcContent.fname)

it shows the errors: -

Loading binned counts file
Checking every sampleID has an outcome
Finding bins to exclude in Chr Y 
... excluding 25 bins,  74.1 % of counts mapped to chrY in females.
Sample sample has less than 2 million counts
Sample sample1 has less than 2 million counts
Number of discarded samples: 2
Not doing PCA
Checking for outlier samples...
Samples with correlation to the mean bin counts of < 0.8. You may want to remove these from the reference set.
factor(0)
Levels: sample117 sample118 sample119 sample120
Summing counts per chromosome...
Finding baseline values...
Calling the unknowns 
Using zscore
Error in if (cleaned.counts[i, "zY_females"] > 3) { : 
  missing value where TRUE/FALSE needed

Log in to answer this question.