bam2wig.py _ error when converting BAM to Wiggle

I aligned RNA-seq reads against a custom-build reference genome using Bowtie2. I use the produced BAM with a “chromosom” txt file to generate a WIG file using “BAM to Wiggle” but I get a message error…

Execution resulted in the following messages:
“Fatal error: Exit code 1 (An error occured during execution, see stderr and stdout for more information)”
“Fatal error: An error occured during execution, see stderr and stdout for more information”

Tool generated the following standard error:
“Processing CP004075.1 …
Processing CP001179.1 …
Traceback (most recent call last):
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__rseqc@2.6.4/bin/bam2wig.py”, line 105, in
main()
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__rseqc@2.6.4/bin/bam2wig.py”, line 102, in main
obj.bamTowig(outfile = options.output_prefix, chrom_sizes = chromSizes, chrom_file = options.chromSize, q_cut = options.map_qual, skip_multi=options.skip_multi,strand_rule = options.strand_rule, WigSumFactor=norm_factor)
File “/cvmfs/main.galaxyproject.org/deps/_conda/envs/__rseqc@2.6.4/lib/python2.7/site-packages/qcmodule/SAM.py”, line 2597, in bamTowig
if strandRule[key] == ‘+’:Fwig[pos] +=1.0
KeyError: ‘+’”

Could anyone help me please?
Thanks,
Alicia

1 Like

Hi @AliciaNevers,
according to the source code, there is a problem with the StrandRule; which kind of reads are you using (single or paired) and which output did you get from Infer experiment.

Regards

Thanks for your answer.
I didn’t try the infer experiment, is it mandatory?
My reads are single for this experiment. But I tried to run again a previous job with Paired-end reads from another experiment using “Bam to wiggle” code. I did’nt work either this time whereas it gave me nice coverage files a year ago…

Regards
Alicia


Hi @AliciaNevers,
could you repeat the analysis with the previous tool version? Bam to Wiggle 2.4. If it works then we can confirm that there’s a bug in the last update.

Regards

I’m sorry but I can’t use this previous update on the regular usegalaxy.org and I don’t know how to transfer my account to Galaxy europe… When I try to log in with my informations on Galaxy europe i’m not recognized.
Could you send me the link for usegalaxy.org please?

Thanks a lot,
Alicia

Hi @AliciaNevers,
unfortunately, this is not available in usegalaxy.org, but if you share with me your history I can test it in the European instance. I’ll provide you my mail by DM.

Regards

Hi,

Ok, I understand… What is a DM?

Can I copy the link here or you wouldn’t do like that?

Thanks in advance,

Regards,

Alicia

Hi @AliciaNevers,
I repeated the analysis in the previous version and it ran fine, then the problem seems to be related to the last update. I’ll review it.

Regards

2 Likes

Thanks a lot for your help, your were really efficient!
I will wait for it to be fixed then.

Regards,
Alicia

Hi @AliciaNevers,
after testing again the datasets, I found that the latest version works fine in the usegalaxy.eu. I created an issue in order to report the problem https://github.com/galaxyproject/tools-iuc/issues/3751.

Regards