problem with fetchChromSizes

723 views
Skip to first unread message

Wiese, Katrin

unread,
Mar 12, 2015, 3:09:19 PM3/12/15
to genome...@soe.ucsc.edu
Hi,

I am trying to generate a bigwig file with all chromosomes from the phastCons46way wig files (only placental mammals).

The first problem I encounter is already to get the fetchChromSizes script to work - I tried like this:

$ chmod 777 fetchChromSizes
$ ./fetchChromSizes hg19 > hg19.chrom.sizes

and I get a file but it is empty (zero bytes).

If I run this:
$ for file in *.gz
> do
> zcat < $file | grep -v ^track > f:r.temp
> wigToBigWig -clip -fixedSummaries -keepAllChromosomes f:r.temp hg19.chrom.sizes f:r.bw
> rm f:r.temp
> done

- I get the message that chr1 (and so on) cannot be found.

Could you help me figure out what is wrong?

I also tried $ wget ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/chromInfo.txt.gz and then my code works but is this the same information?

Thank you for your help,

Katrin





-----------------------------------------------------------------------------------------------------------------------------
Katrin Wiese
Postdoc


Swammerdam Institute for Life Sciences (SILS) | Faculty of Science | University of Amsterdam
Postbus 94215 | 1090 GE Amsterdam | the Netherlands

Visiting address:
Room C2.267 | Science Park 904 | 1098 XH Amsterdam








Hiram Clawson

unread,
Mar 12, 2015, 3:15:12 PM3/12/15
to Wiese, Katrin, genome...@soe.ucsc.edu
Good Afternoon Katrin:

I'm curious what fetchChromSizes says as information messages about what it
is doing when you run:

$ ./fetchChromSizes hg19 > hg19.chrom.sizes

It should indicate what method it is using to get the information.

Your procedure of running wget to get the chromInfo.txt.gz file is what the
fetchChromSizes can do as one of its fetch methods. The additional step is
performed that selects out two columns from that file:
zcat chromInfo.txt.gz | cut -f1,2 | sort -k2nr > hg19.chrom.sizes

--Hiram

On 3/12/15 12:07 PM, Wiese, Katrin wrote:
> Hi,
>
> I am trying to generate a bigwig file with all chromosomes from the phastCons46way wig files (only placental mammals).
>
> The first problem I encounter is already to get the fetchChromSizes script to work - I tried like this:
>
> $ wget http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/fetchChromSizes <http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/fetchChromSizes>
> $ chmod 777 fetchChromSizes
> $ ./fetchChromSizes hg19 > hg19.chrom.sizes
>
> and I get a file but it is empty (zero bytes).
>
> If I run this:
> $ for file in *.gz
>> do
>> zcat < $file | grep -v ^track > f:r.temp
>> wigToBigWig -clip -fixedSummaries -keepAllChromosomes f:r.temp hg19.chrom.sizes f:r.bw
>> rm f:r.temp
>> done
>
> - I get the message that chr1 (and so on) cannot be found.
>
> Could you help me figure out what is wrong?
>
> I also tried $ wget ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/chromInfo.txt.gz <ftp://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/chromInfo.txt.gz> and then my code works but is this the same information?
>
> Thank you for your help,
>
> Katrin
>
>
>
>
>
> -----------------------------------------------------------------------------------------------------------------------------
> Katrin Wiese
> Postdoc
>
> K.W...@uva.nl <mailto:K.W...@uva.nl> | T: +31 (0)205257936
> http://www.vanamerongenlab.nl <http://www.vanamerongenlab.nl/>

Brian Lee

unread,
Mar 12, 2015, 4:50:26 PM3/12/15
to Hiram Clawson, Wiese, Katrin, genome...@soe.ucsc.edu

Dear Katrin

Thank you for using the UCSC Genome Browser and your question about fetchChromSizes and obtaining hg19.chrom.sizes.

We recently added the output of fetchChromSizes to the /bigZips/ directory of assemblies. If you wget the following file, it will be exactly the same information as from doing fetchChromSizes hg19:

http://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/hg19.chrom.sizes

There are now likewise $database.chrom.sizes in the bigZip directories of other $databases, for example hg38:

http://hgdownload.cse.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes

We also plan to update the usage statements of utilities like wigToBigWig to inform users of the new path for obtaining chrom.sizes, versus using fetchChromSizes.

Thank you again for your inquiry and using the UCSC Genome Browser. If you have any further questions, please reply to gen...@soe.ucsc.edu. All messages sent to that address are archived on a publicly-accessible forum. If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

All the best,

Brian Lee
UCSC Genome Bioinformatics Group


--


Reply all
Reply to author
Forward
0 new messages