View Single Post
Old 01-20-2016, 01:49 AM   #2
dariober
Senior Member
 
Location: Cambridge, UK

Join Date: May 2010
Posts: 311
Default

You can get chromosome sizes from UCSC with something like this (credit: bedtools docs):

Code:
mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e \
	"select chrom, size from mm9.chromInfo"  > mm9.genome
Then you could check if these sizes match the sizes used by bowtie2 to build the index (they should). I think the utility bowtie2-inspect with -s option should give you the chromosome lengths.

Finally, you could extract chrom sizes from the header of a bam file with e.g:

Code:
samtools view -H aln.bam \
    | grep -P "@SQ\tSN:" \
    | sed 's/@SQ\tSN://' \
    | sed 's/\tLN:/\t/' > genome.txt
dariober is offline   Reply With Quote