o
    NrfÆ  ã                   @   s   d dl mZ ddd„ZdS )é    Nc                    sf   | durt  | ¡‰ ˆ j}‡ fdd„ˆ jD ƒ}n|du rtdƒ‚t  |¡‰ t  |¡}t  |¡}ˆ ||fS )a¥  
    Load a set of chromosomes from a file or using an assembly
    identifier. If using just an assembly identifier the chromsizes
    will be loaded from the negspy repository.

    Parameters:
    -----------
    chromsizes_filename: string
        The file containing the tab-delimited chromosome sizes
    assembly: string
        Assembly name (e.g. 'hg19'). Not necessary if a chromsizes_filename is passed in
    Nc                    s   g | ]}ˆ j | ‘qS © )Zchrom_lengths)Ú.0Úc©Z
chrom_infor   ú\/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/clodius/chromosomes.pyÚ
<listcomp>   s    z#load_chromsizes.<locals>.<listcomp>zŸNo assembly or chromsizes specified. Please specify an assembly using the --assembly parameter or a set of chromsizes using the --chromsizes-filename parameter)ÚncZget_chrominfo_from_fileZchrom_orderÚ
ValueErrorZget_chrominfoZget_chromorderZget_chromsizes)Zchromsizes_filenameZassemblyZchrom_namesZchrom_sizesr   r   r   Úload_chromsizes   s   
ÿ



r
   )N)Znegspy.coordinatesZcoordinatesr   r
   r   r   r   r   Ú<module>   s    