leraman/wisecondorX

AttributeError: ‘NoneType’ object has no attribute ‘encode’

Opened this issue · 17 comments

Hi,
I followed the steps provided in the page.
As,
Converted all .bam to .npz
Then created reference.npz
while predicting the CNAs, I am getting the foolowing error,
python2 wisecondorX.py predict '/run/user/1000/gvfs/smb-share:server=192.168.1.224,share=rgcs/wisecondorX-master/test/GL18_0320.npz' '/run/user/1000/gvfs/smb-share:server=192.168.1.224,share=rgcs/wisecondorX-master/reference/reference_output.npz' output_id -plot Importing data ... Applying between-sample normalization ... Applying within-sample normalization ... Obtaining CBS segments ... Error in library("DNAcopy") : there is no package called ‘DNAcopy’ Calls: suppressMessages -> withCallingHandlers -> library Execution halted Traceback (most recent call last): File "wisecondorX.py", line 443, in <module> main() File "wisecondorX.py", line 436, in main args.func(args) File "wisecondorX.py", line 276, in toolTest cbs_calls = CBS(args, resultsR, resultsZ, gender, WC_dir) File "/run/user/1000/gvfs/smb-share:server=192.168.1.224,share=rgcs/wisecondorX-master/python/wisetools.py", line 601, in CBS cbs_data = json.load(open(json_cbs_temp_dir + "_02.json"))[1:] IOError: [Errno 2] No such file or directory: '/run/user/1000/gvfs/smb-share:server=192.168.1.224,share=rgcs/wisecondorX-master/output_id_CBS_tmp_02.json'
Please help me to rectify the error.

Thanks in advance.
Greeshma

Hi,
It appears the R package "DNAcopy" isn't installed. You can install it according to https://bioconductor.org/packages/release/bioc/html/DNAcopy.html. Let me know if this fixed your issue.

Cheers

Thank you.
I installed DNAcopy. Now I'm getting the following error.
screenshot from 2018-05-11 15-26-25

Please help me to resolve the same
Thanks with regards
Greeshma.

ludev commented

Hi Greeshma,
I also had the same problem.
I solved by increasing the -binsize parameter.

I have never experienced this error. Would you mind sending me your reference and a test npz?

ludev commented

Hi
sorry for my english.
I have fixed correct cbs_data = [[float(y.encode("utf-8")) for y in x] for x in cbs_data]
in cbs_data = [[float(y) for y in x] for x in cbs_data]
and I set -binsize 500kb or 1000kb to have a valid value of y

Hi,
Sorry for the delayed reply, as I lost connection to my server.
@leraman, I am not able to upload my reference and test npz files, since they are more than 100MB (after compressing) and I'm getting alert message here.

@ludev, can you confirm the issue was fixed without changing the -binsize parameter? What coverage is your sequencing data?

@GreeshmaThulasi, you could use, if you want to, e.g. https://transfer.pcloud.com to send the files to lennart.raman@ugent.be.

Hi @GreeshmaThulasi,

Thanks for your files. I've executed some tests and noticed that the complete X-chromosome is blacklisted. My best guess is that you've created a NIPT reference using pregnancies of male and female feti. As the X-chromosome is fetal content depended, it is consequently completely blacklisted. I have updated the readme to additionally remark that a NIPT reference should be created using exclusively pregnancies of female feti.

Cheers,

Lennart

chromosomewide

Hi @leraman ,
Thank you for giving result. How did you executed the test.npz against reference.npz ?
Yeah, true I created reference with both male and female!
Do we have to create two different reference set separately for male and female fetuses?
I am trying to use this for a set of NIPT samples, in which I don't know the sex of fetus, since NIPT is the screening and primary test. Then how will I execute a test sample against any of the reference set (male or female), since I don't know whether the fetus going to be male or female ?

ludev commented

Hi @leraman ,
yes, I confirm use with default settings.
I have an average coverage is 0.9 x.
now I'm evaluating the reliability on some samples with known abberations.
the samples (including reference) have been aligned with Isaac aligner version 4 on hg19, do you think I will have problems?
should I re-align bowtie2 on hg38?

congratulations, is very fast.

thank you.

@GreeshmaThulasi If you don't know the fetal gender, there are numerous software that can aid in predicting the later. You could also simply use a Y-read cut-off, using the 'gender' function (but you should find this cut-off yourself, since this is very mapper/sequencer depended): this will not be perfect, but will work in 95 % of the cases; which is sufficient for a 'newref'.
Note that for NIPT, only a female reference set should be created -- irrespective of the gender of your actual test fetus.

@ludev I'm not sure, I have never tested it using your aligner. I have tested some other software, and Bowtie2 + hg38 returned superior results.

Note that this is still a work in progress which is yet to be publish. Soon, the repo will move and will become conda installable. I'll keep you updated

@GreeshmaThulasi That is correct! Reason: for NIPT you actually exclusively test females. For its reference set you require constant X-chromosome levels, which is why the reference should only contain pregnancies of female fetuses