1730ff9edd3add19e65f8b50f4d51052e3285cb1
brianlee
Fri Feb 5 12:13:53 2021 -0800
Adding input from user on backslash on sed command and other fix and wget command to bigChain.html refs #26935
diff --git src/hg/htdocs/goldenPath/help/bigChain.html src/hg/htdocs/goldenPath/help/bigChain.html
index 00ca533..33483c3 100755
--- src/hg/htdocs/goldenPath/help/bigChain.html
+++ src/hg/htdocs/goldenPath/help/bigChain.html
@@ -73,39 +73,45 @@
Download the bedToBigBed
and hgLoadChain
programs from the UCSC
binary utilities directory.
Step 4.
Use the fetchChromSizes
script from the
same directory to create a
chrom.sizes file for the UCSC database with which you are working (e.g., hg38).
Alternatively, you can download the
chrom.sizes file for any assembly hosted at UCSC from our
downloads page (click on "Full
data set" for any assembly). For example, the hg38.chrom.sizes file for the hg38
database is located at
http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes.
+Here are wget commands to obtain these above files. +
wget https://genome.ucsc.edu/goldenPath/help/examples/bigChain.as
+wget https://genome.ucsc.edu/goldenPath/help/examples/bigLink.as
+wget http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes
+wget https://genome.ucsc.edu/goldenPath/help/examples/chr22_KI270731v1_random.hg38.mm10.rbest.chain
+
Step 5.
Use the hgLoadChain
utility to generate the chain.tab and link.tab
files needed to create the bigChain file:
-hgLoadChain -noBin -test hg38 bigChain chr22_KI2707731v1_random.hg38.mm10.rbest.chain
+hgLoadChain -noBin -test hg38 bigChain chr22_KI270731v1_random.hg38.mm10.rbest.chain
Step 6.
Create the bigChain file from your input chain file using a combination of sed
,
awk
and the bedToBigBed
utility:
-
sed 's/.000000//' chain.tab | awk 'BEGIN {OFS="\t"} {print $2, $4, $5, $11, 1000, $8, $3, $6, $7, $9, $10, $1}' > chr22_KI270731v1_random.hg38.mm10.rbest.bigChain
+sed 's/\.000000//' chain.tab | awk 'BEGIN {OFS="\t"} {print $2, $4, $5, $11, 1000, $8, $3, $6, $7, $9, $10, $1}' > chr22_KI270731v1_random.hg38.mm10.rbest.bigChain
bedToBigBed -type=bed6+6 -as=bigChain.as -tab chr22_KI270731v1_random.hg38.mm10.rbest.bigChain hg38.chrom.sizes bigChain.bb
Step 7.
To display your date in the Genome Browser, you must also create a binary indexed link file to
accompany your bigChain file:
awk 'BEGIN {OFS="\t"} {print $1, $2, $3, $5, $4}' link.tab | sort -k1,1 -k2,2n > bigChain.bigLink
bedToBigBed -type=bed4+1 -as=bigLink.as -tab bigChain.bigLink hg38.chrom.sizes bigChain.link.bb
Step 8.
Move the newly created bigChain (bigChain.bb) and bigLink (bigChain.link.bb)
files to a web-accessible http, https or ftp location.
Step 9.
Construct a custom track using a single
track line. Note that any of the track attributes listed