S4Vectors and subectHits error
2
0
Entering edit mode
TriS ▴ 200
@tris-5635
Last seen 4.3 years ago
United States

hi all

I've been trying to run CopywriteR, which requires S4Vectors to run.

after it creates the bam and bed files, it throws the error below:

lement index: 1, 2, 3, 4, 5, 6, ...

  first error: could not find function "subjectHits"

I thought it was because I didn't have installed S4Vectors, but it made no difference once I installed it.

then I read that from version 0.10 (https://github.com/Bioconductor/S4Vectors/blob/master/NEWS) the subjectHits function was changed to the to function

I installed then the 0.8.11 version but now I get

1: replacing previous import ‘stats::sd’ by ‘BiocGenerics::sd’ when loading ‘S4Vectors’ 

2: replacing previous import ‘stats::var’ by ‘BiocGenerics::var’ when loading ‘S4Vectors’ 

3: no function found corresponding to methods exports from ‘IRanges’ for: ‘elementNROWS’, ‘from’, ‘nLnode’, ‘nRnode’, ‘pcompare’, ‘pcompareRecursively’, ‘relistToClass’, ‘to’ 
Execution halted

which tells me (maybe?) that the new S4Vectors knew to redirect the subjectHits onto the to function (and that's what it was expecting?).

so...I'm kinda of stuck, I cannot find out what happened and how I can get around this..and it's frustrating because CopywriteR runs for like 7hrs on all files but cannot finish the analysis.

thanks!

s4vectors copywriter • 2.3k views
ADD COMMENT
0
Entering edit mode
@michael-lawrence-3846
Last seen 3.0 years ago
United States

It would help to see your sessionInfo() output. My guess is that you are using a years old version that still expects to be getting the subjectHits symbol from IRanges.

ADD COMMENT
1
Entering edit mode

Indeed, our CopywriteR package does depend on subjectHits, but since a small test sample is run during building for the vignette, all the dependencies should be fine. Is it possible to install CopywriteR again using the biocLite tool:

> source("https://bioconductor.org/biocLite.R")
> biocLite("CopywriteR")

If this does not help please let us know.

ADD REPLY
0
Entering edit mode
TriS ▴ 200
@tris-5635
Last seen 4.3 years ago
United States

my apologies for not adding the sessionInfo().

we found out that we had an older version of CopywriteR, we now installed v 2.9.0 and S4Vectors 0.16.0

however, now I get the same error reported here (https://github.com/PeeperLab/CopywriteR#bug):

Error in `[<-.data.frame`(`*tmp*`, , "off.target", value = c(14792244L,  : 
  replacement has 24 rows, data has 44
Calls: CopywriteR -> [<- -> [<-.data.frame
Execution halted

the .log file reports that 

INFO [2018-04-18 04:53:01] Rsamtools finished calculating reads per bin in sample XYZ.bam; number of bins = 154770

as described in GitHub we do have more test samples than normal samples because for a few we have tumor + met and 1 pbmc control. however, this bug was said not to be in the v2.9.0.

I have all new .bam files, all .bed files but it's stuck here...

any suggestions?

pls let me know if you'd like me to open a new thread for this.

thanks!

 

ADD COMMENT
1
Entering edit mode

Ok, that is indeed a known bug but as far as I am aware it should be fixed as of version 2.8.1. I am currently testing a few CopywriteR versions (including 2.9.0) to see whether this bug still occurs. Will keep you updated...

ADD REPLY
0
Entering edit mode

ok thanks. in the meanwhile for samples with two tumors - one control I'm making an extra copy of the control files renaming from file_ctr.bam -->  file_ctr.1.bam. so that they read in as two different files, that should fix the issue. I'll let you know if it works.

tnx

ADD REPLY
0
Entering edit mode

I run two samples in a way that would have caused the bug to throw an error message in older versions of CopywriteR, but with both version 2.8.1 and 2.10.0 it run without problems. I could not find 2.9.0, which happens to be a development-version of CopywriteR. Could you try updating to 2.10.0 and re-run your analysis? If that still does not work, would you be able to share your CopywriteR.log file so that I can try to do some troubleshooting?

ps I moved your second post to the 'answer' section because it represents a new question

ADD REPLY
0
Entering edit mode

thanks for moving the post. 

so, with the 2.9.0 , after copying the ctr file and renaming it as described above I get another error:

Error: 'bplapply' receive data failed:
  error reading from connection
Execution halted

as of now I installed the 2.10 version in my local library and I load CopywriteR from there when I run it on the server, instead of using the global library (with 2.9.0). 

I will send you the log file now using the address on the github page.

thanks for the help!

ADD REPLY
0
Entering edit mode

I got your mail with the CopywriteR.log file. It struck me that the sample.control argument that you are using is not correct. Please refer to this website on the CopywriteR Github page

ADD REPLY
0
Entering edit mode

oh I see, thank you. you refer to adding the control samples on top of the data frame on both sides, correct? I def missed that.

ADD REPLY
0
Entering edit mode

That is correct. Please let me know how things are going.

ADD REPLY
0
Entering edit mode

absolutely, I'm submitting the job as we speak, it'll take several hours because I have lots of samples, I'll definitely post how it worked out.

in the meanwhile, using v2.10 it did generate the read_counts.txt file, but after creating the png/pdf files, it did not complete because it gave the 

Error in value[[3L]](cond) : 
  The GC-content and mappability normalization did not work due to a
  failure to calculate loesses. This can generally be solved by using
  larger bin sizes. Stopping execution of the remaining part of the
  script...
Calls: CopywriteR ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
 unable to open connection to X11 display ''
Execution halted

error. however, that was done with the sample list that you saw. is that still reliable?

ADD REPLY
1
Entering edit mode

Yes, in principle you should get the same error even if you re-run your samples with the updated sample.control variable. What this error means is that the calculations of the loesses (GC-content ~ read counts and mappability ~ read counts) failed. The reason for this is usually that there are not enough read counts per bin, resulting in a sparse distribution of the data points. I would recommend using a bigger bin size (e.g. 50 instead of 20 kb, although the number you should use is dependent on the number of off-target reads).

ADD REPLY

Login before adding your answer.

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