Skip to content

Commit

Permalink
Move old scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pcingola committed Oct 25, 2024
1 parent 5e624ca commit 076a184
Show file tree
Hide file tree
Showing 82 changed files with 1,515 additions and 14 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
773 changes: 773 additions & 0 deletions scripts_build/dbSnp/GCF_000001405.40_GRCh38.p14_assembly_report.txt

Large diffs are not rendered by default.

709 changes: 709 additions & 0 deletions scripts_build/dbSnp/chr2id.txt

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions scripts_build/dbSnp/convert_to_chr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env python3

#
# Convert chromosome IDs in a VCF file from NCBI to human-readable format
#
# Mapping file:
# Download the mapping file from:
# wget "https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/405/GCF_000001405.40_GRCh38.p14/GCF_000001405.40_GRCh38.p14_assembly_report.txt"
#
# Then cut the relevant columns:
# cut -f 1,7 GCF_000001405.40_GRCh38.p14_assembly_report.txt | grep -v "^#" | tee chr2id.txt


# Load the mapping file (assuming it's a TSV or space-separated file)
mapping_file = "chr2id.txt"
chrid2name = {}
with open(mapping_file) as f:
for l in f.readlines():
chr_name, chr_id = l.strip().split("\t")
chrid2name[chr_id] = chr_name


# Example: Translating IDs in a VCF file
vcf_file = "GCF_000001405.38.vcf"
with open(vcf_file, 'r') as file:
for line in file:
if not line.startswith("#"): # Skip header lines
columns = line.strip().split('\t')
if columns[0] in chrid2name:
columns[0] = chrid2name[columns[0]] # Replace chromosome ID
print('\t'.join(columns)) # Print or write to a new file
else:
print(line.strip()) # Print header lines as is
File renamed without changes.
File renamed without changes.
14 changes: 0 additions & 14 deletions spliceSites/u12_branch.pwm

This file was deleted.

0 comments on commit 076a184

Please sign in to comment.