This worked for me! Now the .wig files upload on the UCSC Genome Browser without any error message. Thanks a lot for that!
Just out of curiosity, how is it possible that I ended up having chrEBV reads in my dataset? They belong to the Epstein-Barr virus, right? The biological starting material of the experiment is human cell culture, so I wonder if this is a sign of cell culture contamination. Still, I did not expect that GRChM38 genome assembly would include also genomic regions belonging to EBV.
how did you do that ? what was the cmd -line ? what is the output of `samtools idxstat' ?
My command line was:
samtools idxstats input.bam | cut -f 1 | grep -v chrEBV | xargs samtools view -b input.bam > output_filtered.bamit looks ok. And how did you create the wig ?
I first created .bigWig files with the following command line:
bamCoverage -b input.bam -o output.bw -of bigwig -bs 20 -p 6 --effectiveGenomeSize 2747877777 --normalizeUsing RPKM -e 76 --centerReadsand then converted it from .bigWig to .wig, using this command line:
bigWigToWig input.bw output.wigbamCoveragedoes not allow me to create a .wig file directly, that's why I follow this two-steps procedure. Also, when uploading the tracks on the UCSC Genome Browser, I prefer to go with .wig.gz files rather than .bigWig, since for .bigWig I need to upload them first on a web-server and then provide an URL (as long as I understood).yes, I think ATPoint is right. If bamCoverage uses the SAM header dictionary to create the wig, i will create some records containing the chrEBV chromosome.
Yes, indeed his approach worked fine. Thanks anyway for the reply and the time dedicated to my issue :)