Browser Track Construction: Difference between revisions

From genomewiki
Jump to navigationJump to search
(add general comments to start)
(adding repeat masking)
Line 31: Line 31:
which processes the genbank files into UCSC style fasta and AGP files.  The actual work in the script is simple, it removes the '''.1''' from
which processes the genbank files into UCSC style fasta and AGP files.  The actual work in the script is simple, it removes the '''.1''' from
the accession identifiers in the fasta and AGP files.  The bulk of the script merely maintains the naming scheme and
the accession identifiers in the fasta and AGP files.  The bulk of the script merely maintains the naming scheme and
file system hierarchy for follow-on tool processing.
file system hierarchy for follow-on tool processing.  It creates the directory '''/data/genomes/ricCom1/ucsc/''' and leaves the files
'''ricCom1.ucsc.fa.gz''' and '''ricCom1.ucsc.agp''' files there.


The extra non-nuclear plastid is manually added to the unplaced AGP file and the chrCp fasta sequence included with the
The extra non-nuclear plastid is manually added to the unplaced AGP file and the chrCp fasta sequence included with the
unplaced fasta file to construct the '''.2bit''' file:
unplaced fasta file to construct the '''.2bit''' file:
  cd /data/genomes/ricCom1/ucsc
  cd /data/genomes/ricCom1/ucsc
  faToTwoBit ricCom1.ucsc.fa.gz chrCp.fa ../ricCom.unmasked.2bit
  faToTwoBit ricCom1.ucsc.fa.gz chrCp.fa ../ricCom1.unmasked.2bit
cd /data/genomes/ricCom1
twoBitInfo ricCom1.unmasked.2bit stdout | sort -k2nr > chrom.sizes
 
The chrom.sizes file is useful for later processing.
 
==Repeat Masking==
Repeat masking is necessary for almost all other track construction.  UCSC uses [http://www.repeatmasker.org/ Repeat Masker] for the
repeat masking track, [http://tandem.bu.edu/trf/trf.download.html TRF] for simple repeats, and the
[http://www.ncbi.nlm.nih.gov/pubmed/16287941 NCBI WindowMasker] for the WIndow Masker tracks.
 
The procedure is usually:
* break up the genome sequence into manageable pieces
* cluster run to mask each piece
* reassemble the results to original assembly coordinates
 
A choice is to be made whether the Repeat Masker or Window Masker result is used to mask the sequence.
If Repeat Masker has repeats in the RM libraries for this species and can mask a good amount of
the genome, it can be used for the masking.  If RM only masks a small percent of the genome, then
UCSC uses Window Masker to mask the sequence.  In this ''Ricinus communis'' example, RM only
found '''%3''' in repeats, where Window Masker found almost '''%45''' in repeats.  Thus the Window Masker
result, plus the TRF repeats of period less than or equal to 12 are used to mask the sequence resulting
in '''%45.05''' of the sequence masked.

Revision as of 23:20, 18 April 2013

General comments

The file system layout in the examples here is typical for the UCSC genome browser build. The consistency of the file directory hierarchy allows automatic scripts to perform many of the functions. Therefore, we keep required files in the same location for each browser build to allow the tools to find what they need.

All browser builds are kept under one single directory hierarchy which is on a file system that is also shared with the cluster computer system. This allows work to take place on a large memory work horse system, and also allow the same files to be used during cluster runs for that type of processing.

For example, keeping all browser builds in /data/genomes/ with each specific browser build in a directory of the database name, for example,

  • /data/genomes/hg19/
  • /data/genomes/mm10/
  • /data/genomes/ricCom1/

2bit file construction

The usual genome browser construction at UCSC starts with the official released files from the NCBI FTP site:

ftp://ftp.ncbi.nih.gov/genbank/genomes/Eukaryotes/

Download the NCBI files into:

  • /data/genomes/ricCom1/genbank/

rsync works with the NCBI FTP site:

rsync -a -P rsync://ftp.ncbi.nlm.nih.gov/genbank/genomes/Eukaryotes/plants/Ricinus_communis/JCVI_RCG_1.1/ /data/genomes/ricCom1/genbank/

This is a typical unplaced scaffold assembly with one additional non-nuclear chrCp plastid. There is a UCSC script in the source tree:

unplacedScaffolds.pl

which processes the genbank files into UCSC style fasta and AGP files. The actual work in the script is simple, it removes the .1 from the accession identifiers in the fasta and AGP files. The bulk of the script merely maintains the naming scheme and file system hierarchy for follow-on tool processing. It creates the directory /data/genomes/ricCom1/ucsc/ and leaves the files ricCom1.ucsc.fa.gz and ricCom1.ucsc.agp files there.

The extra non-nuclear plastid is manually added to the unplaced AGP file and the chrCp fasta sequence included with the unplaced fasta file to construct the .2bit file:

cd /data/genomes/ricCom1/ucsc
faToTwoBit ricCom1.ucsc.fa.gz chrCp.fa ../ricCom1.unmasked.2bit
cd /data/genomes/ricCom1
twoBitInfo ricCom1.unmasked.2bit stdout | sort -k2nr > chrom.sizes

The chrom.sizes file is useful for later processing.

Repeat Masking

Repeat masking is necessary for almost all other track construction. UCSC uses Repeat Masker for the repeat masking track, TRF for simple repeats, and the NCBI WindowMasker for the WIndow Masker tracks.

The procedure is usually:

  • break up the genome sequence into manageable pieces
  • cluster run to mask each piece
  • reassemble the results to original assembly coordinates

A choice is to be made whether the Repeat Masker or Window Masker result is used to mask the sequence. If Repeat Masker has repeats in the RM libraries for this species and can mask a good amount of the genome, it can be used for the masking. If RM only masks a small percent of the genome, then UCSC uses Window Masker to mask the sequence. In this Ricinus communis example, RM only found %3 in repeats, where Window Masker found almost %45 in repeats. Thus the Window Masker result, plus the TRF repeats of period less than or equal to 12 are used to mask the sequence resulting in %45.05 of the sequence masked.