Need a BSgenome.Btaurus.UCSC.bostau9 package
1
@james-w-macdonald-5106
Last seen 34 minutes ago
United States
I'm not sure you need to make a BSgenome
package these days, but instead can simply download and import the 2bit file.
> library(rtracklayer)
> download.file("ftp://hgdownload.soe.ucsc.edu/goldenPath/bosTau9/bigZips/bosTau9.2bit ", "bosTau9.2bit")
trying URL 'ftp://hgdownload.soe.ucsc.edu/goldenPath/bosTau9/bigZips/bosTau9.2bit'
downloaded 679.5 MB
> z <- TwoBitFile("bosTau9.2bit")
> z
TwoBitFile object
resource: bosTau9.2bit
> zz <- import(z)
> zz
A DNAStringSet instance of length 2211
width seq names
[1] 158534110 GTACACTGATCACGTGGCTG...AGATAAATCCATTAAATGA chr1
[2] 103308737 TGGAAATTAAAGGGAAGAAT...TAGCGTTAGGGTTCGCGTA chr10
[3] 106982474 TCATGCACTGATCACGTGGC...GTGTTGGCCAGGGAAGTAT chr11
[4] 87216183 TTTCATGATCAAAAGCCACG...AGGAGTGGAATTGGTGAGC chr12
[5] 83472345 ATGCACACATCAGGTGGCTT...AGGGGGGTTGGGTTAGGGT chr13
... ... ...
[2207] 1124660 TAGTGTGGAGGATCACTATT...ATAACTACTGAAGCCTGTG chrUn_NW_020192291v1
[2208] 9309904 CCATACAGCACCAATGATAA...ATATTCAGTACCTATTTAT chrUn_NW_020192292v1
[2209] 27572 TCTCCTGTGTTGTAGGAAGA...TGATGCCTGTTCAGTGATT chrUn_NW_020192293v1
[2210] 986051 TGCCCATGTGTATATACCTG...ACAAAAAATCGAGTACTCT chrUn_NW_020192294v1
[2211] 139009144 CCTAACCCTAACCCTAACCC...TGTATTTCTCTTTCTTTTT chrX
You can also import just portions
> import(z, which = GRanges("chr1:1-100000"))
A DNAStringSet instance of length 1
width seq
[1] 100000 GTACACTGATCACGTGGCTGATCATGCACAAAT...CTTACCTTTTCATGCACTGATTACCTGGCTATC
Login before adding your answer.
Traffic: 909 users visited in the last hour
Hi James,
Thank you very much for your suggestion. I tried to follow your steps however I got the error message as below:
Do you have any idea why it does not work?
Thanks, Loan
Try downloading it directly, using a browser.
Hi James, I think the problem caused by using window. I used Mac OS to run and it worked.
Thanks again for all your help and your time
Loan