<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Reading genomic dataframes
Step1:  Bioframe provides multiple methods to convert data stored in common genomic file formats to pandas dataFrames in bioframe.io.
Reading tabular text data
The most common need is to read tablular data, which can be accomplished with bioframe.read_table. This function wraps pandas pandas.read_csv/pandas.read_table (tab-delimited by default), but allows the user to easily pass a schema (i.e. list of pre-defined column names) for common genomic interval-based file formats. 
For example,
Step2:  The schema argument looks up file type from a registry of schemas stored in the bioframe.SCHEMAS dictionary
Step3:  UCSC Big Binary Indexed files (BigWig, BigBed)
Bioframe also has convenience functions for reading and writing bigWig and bigBed binary files to and from pandas DataFrames.
Step4:  Reading genome assembly information
The most fundamental information about a genome assembly is its set of chromosome sizes.
Bioframe provides functions to read chromosome sizes file as pandas.Series, with some useful filtering and sorting options
Step5:  Bioframe provides a convenience function to fetch chromosome sizes from UCSC given an assembly name
Step6:  Bioframe can also generate a list of centromere positions using information from some UCSC assemblies
Step7:  These functions are just wrappers for a UCSC client. Users can also use UCSCClient directly
<ASSISTANT_TASK:>
Python Code:
import bioframe
Explanation: Reading genomic dataframes
End of explanation
df = bioframe.read_table(
    'https://www.encodeproject.org/files/ENCFF001XKR/@@download/ENCFF001XKR.bed.gz', 
    schema='bed9'
)
display(df[0:3])
df = bioframe.read_table(
    "https://www.encodeproject.org/files/ENCFF401MQL/@@download/ENCFF401MQL.bed.gz", 
     schema='narrowPeak')
display(df[0:3])
df = bioframe.read_table(
    'https://www.encodeproject.org/files/ENCFF001VRS/@@download/ENCFF001VRS.bed.gz', 
     schema='bed12'
)
display(df[0:3])
Explanation: Bioframe provides multiple methods to convert data stored in common genomic file formats to pandas dataFrames in bioframe.io.
Reading tabular text data
The most common need is to read tablular data, which can be accomplished with bioframe.read_table. This function wraps pandas pandas.read_csv/pandas.read_table (tab-delimited by default), but allows the user to easily pass a schema (i.e. list of pre-defined column names) for common genomic interval-based file formats. 
For example,
End of explanation
bioframe.SCHEMAS['bed6']
Explanation: The schema argument looks up file type from a registry of schemas stored in the bioframe.SCHEMAS dictionary:
End of explanation
bw_url = 'http://genome.ucsc.edu/goldenPath/help/examples/bigWigExample.bw'
df = bioframe.read_bigwig(bw_url, "chr21", start=10_000_000, end=10_010_000)
df.head(5)
df['value'] *= 100
df.head(5)
chromsizes = bioframe.fetch_chromsizes('hg19')
bioframe.to_bigwig(df, chromsizes, 'times100.bw')  
# note: requires UCSC bedGraphToBigWig binary, which can be installed as
# !conda install -y -c bioconda ucsc-bedgraphtobigwig
bb_url = 'http://genome.ucsc.edu/goldenPath/help/examples/bigBedExample.bb'
bioframe.read_bigbed(bb_url, "chr21", start=48000000).head()
Explanation: UCSC Big Binary Indexed files (BigWig, BigBed)
Bioframe also has convenience functions for reading and writing bigWig and bigBed binary files to and from pandas DataFrames.
End of explanation
bioframe.read_chromsizes(
    'https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes'
)
bioframe.read_chromsizes('https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes',
                         filter_chroms=False)
dm6_url = 'https://hgdownload.soe.ucsc.edu/goldenPath/dm6/database/chromInfo.txt.gz'
bioframe.read_chromsizes(dm6_url,
                         filter_chroms=True, 
                         chrom_patterns=("^chr2L$", "^chr2R$", "^chr3L$", "^chr3R$", "^chr4$", "^chrX$")
)
bioframe.read_chromsizes(dm6_url, chrom_patterns=["^chr\d+L$", "^chr\d+R$", "^chr4$", "^chrX$", "^chrM$"])
Explanation: Reading genome assembly information
The most fundamental information about a genome assembly is its set of chromosome sizes.
Bioframe provides functions to read chromosome sizes file as pandas.Series, with some useful filtering and sorting options:
End of explanation
chromsizes = bioframe.fetch_chromsizes('hg38')
chromsizes[-5:]
# # bioframe also has locally stored information for certain assemblies that can be 
# # read as follows 
# bioframe.get_seqinfo()
# bioframe.get_chromsizes('hg38', unit='primary', type=('chromosome', 'non-nuclear'), )
Explanation: Bioframe provides a convenience function to fetch chromosome sizes from UCSC given an assembly name:
End of explanation
display(
    bioframe.fetch_centromeres('hg38')[:3]
)
Explanation: Bioframe can also generate a list of centromere positions using information from some UCSC assemblies:
End of explanation
client = bioframe.UCSCClient('hg38')
client.fetch_cytoband()
Explanation: These functions are just wrappers for a UCSC client. Users can also use UCSCClient directly:
End of explanation
<END_TASK>