<jupyter_start><jupyter_text>```dx download chr-subset-genes-variants/all_variants_chr21.tsv```<jupyter_code>library(dplyr)
vars.df = read.table('all_variants_chr21.tsv', as.is=TRUE, header=TRUE)
head(vars.df)<jupyter_output><empty_output><jupyter_text>nstd102 inc. ClinGen CNVs```dx download Annotation/nstd102\ \(ClinVarSV\ -\ includes\ ClinGen\ CNVs\)/nstd102.GRCh38.variant_call.tsv.gz```<jupyter_code>clin.df = read.table('nstd102.GRCh38.variant_call.tsv.gz', as.is=TRUE, skip=1, comment='', sep='\t', header=TRUE)
head(clin.df)
clin.df %>% mutate(variant_id=X.variant_call_accession, sv_clinical_significance=clinical_significance) %>% 
    filter(variant_id %in% vars.df$variant_id) %>% select(variant_id, sv_clinical_significance) %>% 
    write.table('sv.clinical.variants.chr21.nstd120.tsv', row.names=FALSE, sep='\t', quote=FALSE)<jupyter_output><empty_output><jupyter_text>```dx upload sv.clinical.variants.chr21.nstd120.tsv --path chr-subset-genes-variants/dx upload make-misc-tsvs.ipynb --path chr-subset-genes-variants/```  Compact ClinVar TSV ```dx download chr-subset-genes-variants/final_clinvar_dbvar_results.txt```<jupyter_code>clinvar = read.table('final_clinvar_dbvar_results.txt', as.is=TRUE, sep='\t')
colnames(clinvar) = c('variant_id', 'effect')
head(clinvar)
clinvar.sum = clinvar %>% group_by(variant_id, effect) %>% summarize(n=n())
head(clinvar.sum)
write.table(clinvar.sum, file='final_clinvar_dbvar_results_summary.txt', sep='\t', row.names=FALSE, quote=FALSE)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16951379763469118, 'fraction_numerical': 0.020367936925098553, 'mean_word_length': 7.854651162790698, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '524112', 'license': 'MIT', 'n_tokens_mistral': 646, 'n_tokens_neox': 577, 'n_words': 68, 'path': 'scripts/make-misc-tsvs.ipynb', 'repo_name': 'collaborativebioinformatics/GeneVar', 'size': '1522'}