U
    0K	ha  ã                   @   s†  d dl mZmZmZ d dlmZ d dlmZ d dlm	Z	 ddl
mZmZ d dlZd dlZdd	„ Zd
d„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zd d!„ Zd"d#„ Zd$d%„ Zd&d'„ Zd(d)„ Zed*d+�d,d-„ ƒZ d.d/„ Z!d0d1„ Z"d2d3„ Z#d4d5„ Z$d6d7„ Z%d8d9„ Z&d:d;„ Z'd<d=„ Z(d>d?„ Z)d@dA„ Z*dBdC„ Z+dDdE„ Z,dFdG„ Z-dHdI„ Z.dJdK„ Z/dLdM„ Z0dNdO„ Z1dPdQ„ Z2dS )Ré    )ÚrenderÚredirectÚget_object_or_404)Úlogin_required)ÚDataset)Ú	Histologyé   )Ú	LoginFormÚ
SearchFormNc                 C   s*   t j ¡ }dd„ |D ƒ}t| d||dœƒS )Nc                 S   s   g | ]}|j j‘qS © )ÚdataÚname)Ú.0Údatasetr   r   ú!/var/www/website-v5/base/views.pyÚ
<listcomp>   s     zatlas.<locals>.<listcomp>z
atlas.html)ÚdatasetsÚdataset_data_names©r   ÚobjectsÚallr   )Úrequestr   r   r   r   r   Úatlas
   s    
þr   c                 C   s   t j ¡ }t| dd|iƒS )Nzcompare.htmlr   r   ©r   r   r   r   r   Úcompare   s
    
 ÿr   c                 C   s   t j ¡ }t| dd|iƒS )Nzlooselipssinkships2.htmlr   r   r   r   r   r   Úlooselipssinkships2   s
    
 ÿr   c                 C   s   t j ¡ }t| dd|iƒS )NzThompson-et-al-2024.htmlr   r   r   r   r   r   ÚThompson_et_al_2024!   s
    
 ÿr   c                 C   s
   t | dƒS )Nz	data.html©r   ©r   r   r   r   r   )   s    r   c                 C   s
   t | dƒS )Nzlanding.htmlr   r   r   r   r   Úlanding,   s    r   c                 C   s
   t | dƒS )NzumapTest.htmlr   r   r   r   r   ÚumapTest/   s    r    c                 C   s   t | di ƒS )Nzpapers/Makkar-et-al-2024.htmlr   r   r   r   r   ÚMakkar_et_al_20242   s    r!   c                 C   s
   t | dƒS )Nzpapers/jassonpaper/aging.htmlr   r   r   r   r   Úaging5   s    r"   c                 C   s
   t | dƒS )Nzpapers/jassonpaper/ko_wt.htmlr   r   r   r   r   Úko_wt7   s    r#   c                 C   s
   t | dƒS )Nzpapers/jassonpaper/gdx_ovx.htmlr   r   r   r   r   Úgdx_ovx9   s    r$   c                 C   s
   t | dƒS )Nz%papers/jassonpaper/jassonexample.htmlr   r   r   r   r   Újassonexample;   s    r%   c                 C   s   t | di ƒS )Nzpapers/Thompson-et-al-2025.htmlr   r   r   r   r   ÚThompson_et_al_2025>   s    r&   c                 C   s
   t | dƒS )Nz)papers/Thompson-et-al-2025/scRNA-seq.htmlr   r   r   r   r   ÚThompson_scRNA_seqA   s    r'   c                 C   s
   t | dƒS )Nz*papers/Thompson-et-al-2025/Stereo-seq.htmlr   r   r   r   r   ÚThompson_Stereo_seqC   s    r(   c                 C   s$   t j ¡ }ddg}t| d||dœƒS )Nz	hist-cardzhist-card-tallzhistology.html)ÚhistologyGalleryÚcss_classes)r   r   r   r   )r   r)   r*   r   r   r   Ú	histologyF   s    
þr+   c                 C   s<   | j dkr&t| jƒ}| ¡ r,tdƒS ntƒ }t| dd|iƒS )NÚPOSTz/dashboard/z
login.htmlÚform)Úmethodr	   r,   Úis_validr   r   )r   r-   r   r   r   Úlogin_   s    


r0   z/login/)Ú	login_urlc                 C   s   t j ¡ }t| dd|iƒS )Nzdashboard.htmlr   r   r   r   r   r   Ú	dashboardl   s
    
 ÿr2   c                 C   s   t | di ƒS )Nzpapers/Kindl2025/menu.htmlr   r   r   r   r   Ú	kindletalw   s    r3   c                 C   s   t | di ƒS )Nzpapers/Kindl2025/scRNAseq.htmlr   r   r   r   r   ÚkindlscRNAseq|   s    r4   c                 C   s   t | di ƒS )Nzpapers/Kindl2025/scATACseq.htmlr   r   r   r   r   ÚkindlscATACseq�   s    r5   c                 C   s   t | di ƒS )Nzpapers/Kindl2025/ChIPseq.htmlr   r   r   r   r   ÚkindlChIPseq†   s    r6   c                 C   s   t | di ƒS )Nz papers/Kindl2025/Multiomics.htmlr   r   r   r   r   ÚkindlMultiomics‹   s    r7   c                 C   s   t | di ƒS )Nz'papers/woundAtlas/parallelWounding.htmlr   r   r   r   r   ÚparallelWounding�   s    r8   c                 C   s   t | di ƒS )Nzpapers/elife.htmlr   r   r   r   r   Úelife—   s    r9   c                 C   s   t | di ƒS )Nzpapers/elifefb.htmlr   r   r   r   r   Úelifefb›   s    r:   c                 C   s   t | di ƒS )Nzpapers/JID.htmlr   r   r   r   r   ÚJIDŸ   s    r;   c                 C   s   t | di ƒS )Nzpapers/JIDfb.htmlr   r   r   r   r   ÚJIDfb£   s    r<   c                 C   s   t | di ƒS )Nzpapers/expderm.htmlr   r   r   r   r   Úexpderm§   s    r=   c                 C   s   t | di ƒS )Nzpapers/expdermfb.htmlr   r   r   r   r   Ú	expdermfb«   s    r>   c                 C   s   t | di ƒS )Nzpapers/kdm6b.htmlr   r   r   r   r   Úkdm6b°   s    r?   c                 C   s   t | di ƒS )Nzpapers/kdm6b/kdm6b_all.htmlr   r   r   r   r   Ú	kdm6b_allµ   s    r@   c                 C   s   t | di ƒS )Nzpapers/kdm6b/kdm6b_total.htmlr   r   r   r   r   Úkdm6b_totalº   s    rA   c                 C   s   t | di ƒS )Nzpapers/kdm6b/kdm6b_vs.htmlr   r   r   r   r   Úkdm6b_vs¾   s    rB   c                 C   s   t | di ƒS )Nzpapers/kdm6b/kdm6b_time.htmlr   r   r   r   r   Ú
kdm6b_timeÂ   s    rC   c                 C   s
   t | dƒS )Nz;scatacseq-and-scrnaseq-data-from-thompson-et-al-2021-2.htmlr   r   r   r   r   Ú
sean_paperÇ   s    rD   )3Údjango.shortcutsr   r   r   Údjango.contrib.auth.decoratorsr   Zdataset.modelsr   Zhistology.modelsr   Úformsr	   r
   ZumapÚjsonr   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r+   r0   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   r   r   r   r   Ú<module>   sV   	

