~ubuntu-branches/ubuntu/raring/circos/raring

« back to all changes in this revision

Viewing changes to data/karyotype/assembly/parse.assembly

  • Committer: Package Import Robot
  • Author(s): Olivier Sallou
  • Date: 2012-09-21 17:00:12 UTC
  • mfrom: (2.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120921170012-zg3e46ivy2tc0ev2
Tags: 0.62.1-1
New upstream release 

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
# Parses UCSC Assembly table into a Circos karyotype file. 
4
4
#
5
 
# This script will only work on the Assembly table - it will not 
6
 
# work on a Chromosome Band file.
7
 
#
8
 
# parse.assembly horse.txt ec > karyotype.hg19.txt
9
 
#
10
 
# The prefix, e.g. hs, will be used to label the chromosomes (e.g. ec1, ec2 ... )
11
 
# By default, "chr" is used.
12
 
#
13
 
# To download data tables, see http://genome.ucsc.edu/cgi-bin/hgTables
 
5
# See README
14
6
 
15
7
file=$1
16
8
prefix=$2
28
20
 
29
21
# chromosomes
30
22
cat $file | grep -v ^\# | tr A-Z a-z | sed 's/\t/ /g' | tr -s " " | cut -d " " -f 2,3,4 | sort +0 -1 +2rn -3 | sort -u -k 1,1 | sed 's/chr//' | awk '{print $1,$0}' | awk -v prefix=$2 '{print "chr -",prefix$2,$1,0,$4,"chr"$1}' | sort -n +3 -4 
31
 
 
32
 
 
33