Making API request to UCSC Genome API for T2T CHM13v2.0/hs1 DNA sequence
1
1
Entering edit mode
17 months ago
Yukthi ▴ 10

Has anyone had any luck making calls to the UCSC genome API for DNA sequences from the T2T CHM13v2.0 (hs1) assembly? I can easily make calls for hg38 (e.g. api.genome.ucsc.edu/getData/sequence?genome=hg38;chrom=chr1;start=4321;end=5678), however making a call to the hs1 genome doesn't seem to be working. I've checked the list of available UCSC genomes (found here https://api.genome.ucsc.edu/list/ucscGenomes) and hs1 seems to be a valid genome to query, however I am only met with "Bad Request" status messages whenever I try to use it.

I'm sure that I'm just missing something small but some help would be greatly appreciated.

Thanks in advance!

UCSC T2T hs1 Genome • 943 views
ADD COMMENT
4
Entering edit mode
17 months ago
barslmn ★ 2.2k

I couldn't access hs1 too but there is another hub for T2T CHM13v2.0

Listing chromosomes

❯ curl 'api.genome.ucsc.edu/list/chromosomes?hubUrl=https://hgdownload.soe.ucsc.edu/hubs/GCA/009/914/755/GCA_009914755.4/hub.txt;genome=GCA_009914755.4'

Response:

{ "downloadTime": "2022:12:23T22:40:38Z", "downloadTimeStamp": 1671835238, "hubUrl": "https:\/\/hgdownload.soe.ucsc.edu\/hubs\/GCA\/009\/914\/755\/GCA_009914755.4\/hub.txt", "genome": "GCA_009914755.4", "chromCount": 25, "chromosomes": { "CP068254.1": 16569, "CP068257.2": 45090682, "CP068256.2": 51324926, "CP068259.2": 61707364, "CP086569.2": 62460029, "CP068258.2": 66210255, "CP068260.2": 80542538, "CP068261.2": 84276897, "CP068262.2": 96330374, "CP068263.2": 99753195, "CP068264.2": 101161492, "CP068265.2": 113566686, "CP068266.2": 133324548, "CP068268.2": 134758134, "CP068267.2": 135127769, "CP068270.2": 146259331, "CP068269.2": 150617247, "CP068255.2": 154259566, "CP068271.2": 160567428, "CP068272.2": 172126628, "CP068273.2": 182045439, "CP068274.2": 193574945, "CP068275.2": 201105948, "CP068276.2": 242696752, "CP068277.2": 248387328} } %                                                                 

get sequence:

❯ curl 'api.genome.ucsc.edu/getData/sequence?hubUrl=https://hgdownload.soe.ucsc.edu/hubs/GCA/009/914/755/GCA_009914755.4/hub.txt;genome=GCA_009914755.4;chrom=CP068254.1;start=5;end=10'

Response:

{ "downloadTime": "2022:12:23T22:41:22Z", "downloadTimeStamp": 1671835282, "hubUrl": "https:\/\/hgdownload.soe.ucsc.edu\/hubs\/GCA\/009\/914\/755\/GCA_009914755.4\/hub.txt", "genome": "GCA_009914755.4", "chrom": "CP068254.1", "start": 5, "end": 10, "dna": "TGTAG"} %     
ADD COMMENT
0
Entering edit mode

Amazing! Thank you!

ADD REPLY

Login before adding your answer.

Traffic: 1993 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6