LiftOver Howto: Difference between revisions
From genomewiki
Jump to navigationJump to search
No edit summary |
|||
Line 14: | Line 14: | ||
mkdir psl | mkdir psl | ||
for i in ../ci3/rm/masked/*.masked; do blat ../ci2.2bit $i -tileSize=12 -fastMap -minIdentity=98 psl/`basename $i .fa.masked`.psl -noHead -minScore=100; done | for i in ../ci3/rm/masked/*.masked; do blat ../ci2.2bit $i -tileSize=12 -fastMap -minIdentity=98 psl/`basename $i .fa.masked`.psl -noHead -minScore=100; done | ||
* | * Translate psl files to chains in the directory chain: | ||
mkdir chain | mkdir chain | ||
for i in psl/*.psl; do axtChain -linearGap=medium -psl $i ../ci2.2bit ../ci3/ci3.2bit chain/`basename $i .psl`.chain; done | for i in psl/*.psl; do axtChain -linearGap=medium -psl $i ../ci2.2bit ../ci3/ci3.2bit chain/`basename $i .psl`.chain; done | ||
* Merge | * Merge short chains into longer ones into the directory chainMerge: | ||
mkdir chainMerge | mkdir chainMerge | ||
chainMergeSort chain/*.chain | chainSplit chainMerge stdin -lump=50 | chainMergeSort chain/*.chain | chainSplit chainMerge stdin -lump=50 | ||
* concat and sort the chains: | * concat and sort the chains: | ||
cat chainMerge/*.chain > all.chain | cat chainMerge/*.chain > all.chain | ||
chainSort all.chain all.sorted.chain | chainSort all.chain all.sorted.chain | ||
* | * Need info about chromosome sizes for netting: | ||
twoBitInfo ../ci3/ci3.2bit ci3.chromInfo | |||
twoBitInfo ../ci2.2bit ci2.chromInfo | |||
* identify alignable regions from chains: | |||
mkdir net | mkdir net | ||
chainNet all.sorted.chain ci2.chromInfo ci3.chromInfo net/all.net /dev/null | chainNet all.sorted.chain ci2.chromInfo ci3.chromInfo net/all.net /dev/null | ||
* Finally, | * Finally, select the right alignable regions using the nets, creating a "liftOver" file: | ||
netChainSubset net/all.net all.chain ci2ToCi3.liftOver | netChainSubset net/all.net all.chain ci2ToCi3.liftOver |
Revision as of 09:59, 1 July 2010
Creating a liftOver file is very similar to a whole-genome alignment. This page is based on Minimal_Steps_For_LiftOver, but is even more minimalistic.
Also see the page Whole_genome_alignment_howto for some background on tools and terminology.
Outline
- BLAT the new genome onto the old genome
- Sort/Chain/Merge/Split/Net
Alignment
- My genome is rather small, so I don't do any splitting or lifting steps anywhere, that makes it simpler. If you need to split your genome, see Minimal_Steps_For_LiftOver: The old genome is split in chunks and lifting file is generated. After the alignment of the chunks, the resulting chains are lifted back to the original coordinates.
- I have repeatmasked my new genome assembly. The masked fa files are in ../ci3/rm/masked
- The old assembly is called ci2.2bit, the new assembly is in the directory ../ci3. After repeatmasking it's in rm/masked
- I want the alignment .psl to be in the directory psl, so I did the alignment with
mkdir psl for i in ../ci3/rm/masked/*.masked; do blat ../ci2.2bit $i -tileSize=12 -fastMap -minIdentity=98 psl/`basename $i .fa.masked`.psl -noHead -minScore=100; done
- Translate psl files to chains in the directory chain:
mkdir chain for i in psl/*.psl; do axtChain -linearGap=medium -psl $i ../ci2.2bit ../ci3/ci3.2bit chain/`basename $i .psl`.chain; done
- Merge short chains into longer ones into the directory chainMerge:
mkdir chainMerge chainMergeSort chain/*.chain | chainSplit chainMerge stdin -lump=50
- concat and sort the chains:
cat chainMerge/*.chain > all.chain chainSort all.chain all.sorted.chain
- Need info about chromosome sizes for netting:
twoBitInfo ../ci3/ci3.2bit ci3.chromInfo twoBitInfo ../ci2.2bit ci2.chromInfo
- identify alignable regions from chains:
mkdir net chainNet all.sorted.chain ci2.chromInfo ci3.chromInfo net/all.net /dev/null
- Finally, select the right alignable regions using the nets, creating a "liftOver" file:
netChainSubset net/all.net all.chain ci2ToCi3.liftOver