Skip to content

Commit

Permalink
Added support for large bowtie indices
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Tam committed Feb 17, 2023
1 parent 795852e commit a99e528
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions TEsmall/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,43 @@ def check_requirements(folder,genome):

logging.info("Checking if reference genome and annotation files exist...")
if (isdir(folder) and
isdir(WHOLE_GENOME.format(genome)) and
isfile(join(WHOLE_GENOME.format(genome), "genome.fa")) and
isfile(join(WHOLE_GENOME.format(genome), "genome.fa.fai")) and
isfile(join(WHOLE_GENOME.format(genome), "rDNA.fa")) and
isfile(join(WHOLE_GENOME.format(genome), "rDNA.fa.fai")) and
isfile(join(WHOLE_GENOME.format(genome), "tDNA.fa")) and
isfile(join(WHOLE_GENOME.format(genome), "tDNA.fa.fai")) and
isdir(ANNOTATION.format(genome)) and
isfile(join(ANNOTATION.format(genome), "structural_RNA.bed")) and
isfile(join(ANNOTATION.format(genome), "miRNA.bed")) and
isfile(join(ANNOTATION.format(genome), "hairpin.bed")) and
isfile(join(ANNOTATION.format(genome), "exon.bed")) and
isfile(join(ANNOTATION.format(genome), "TE.bed")) and
isfile(join(ANNOTATION.format(genome), "intron.bed")) and
isfile(join(ANNOTATION.format(genome), "piRNA_cluster.bed")) and
isdir(BOWTIE_INDEX.format(genome)) and
isfile(join(BOWTIE_INDEX.format(genome), "genome.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "genome.2.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "genome.3.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "genome.4.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "genome.rev.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "genome.rev.2.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.2.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.3.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.4.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.rev.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.rev.2.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.2.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.3.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.4.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.rev.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.rev.2.ebwt"))):
isdir(WHOLE_GENOME.format(genome)) and
isfile(join(WHOLE_GENOME.format(genome), "genome.fa")) and
isfile(join(WHOLE_GENOME.format(genome), "genome.fa.fai")) and
isfile(join(WHOLE_GENOME.format(genome), "rDNA.fa")) and
isfile(join(WHOLE_GENOME.format(genome), "rDNA.fa.fai")) and
isfile(join(WHOLE_GENOME.format(genome), "tDNA.fa")) and
isfile(join(WHOLE_GENOME.format(genome), "tDNA.fa.fai")) and
isdir(ANNOTATION.format(genome)) and
isfile(join(ANNOTATION.format(genome), "structural_RNA.bed")) and
isfile(join(ANNOTATION.format(genome), "miRNA.bed")) and
isfile(join(ANNOTATION.format(genome), "hairpin.bed")) and
isfile(join(ANNOTATION.format(genome), "exon.bed")) and
isfile(join(ANNOTATION.format(genome), "TE.bed")) and
isfile(join(ANNOTATION.format(genome), "intron.bed")) and
isfile(join(ANNOTATION.format(genome), "piRNA_cluster.bed")) and
isdir(BOWTIE_INDEX.format(genome)) and
(isfile(join(BOWTIE_INDEX.format(genome), "genome.1.ebwt")) or (isfile(join(BOWTIE_INDEX.format(genome), "genome.1.ebwtl")))) and
(isfile(join(BOWTIE_INDEX.format(genome), "genome.2.ebwt")) or (isfile(join(BOWTIE_INDEX.format(genome), "genome.2.ebwtl")))) and
(isfile(join(BOWTIE_INDEX.format(genome), "genome.3.ebwt")) or (isfile(join(BOWTIE_INDEX.format(genome), "genome.3.ebwtl")))) and
(isfile(join(BOWTIE_INDEX.format(genome), "genome.4.ebwt")) or (isfile(join(BOWTIE_INDEX.format(genome), "genome.4.ebwtl")))) and
(isfile(join(BOWTIE_INDEX.format(genome), "genome.rev.1.ebwt")) or (isfile(join(BOWTIE_INDEX.format(genome), "genome.rev.1.ebwtl")))) and
(isfile(join(BOWTIE_INDEX.format(genome), "genome.rev.2.ebwt")) or (isfile(join(BOWTIE_INDEX.format(genome), "genome.rev.2.ebwtl")))) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.2.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.3.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.4.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.rev.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "rDNA.rev.2.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.2.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.3.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.4.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.rev.1.ebwt")) and
isfile(join(BOWTIE_INDEX.format(genome), "tDNA.rev.2.ebwt"))) :
logging.info("Genome and annotation files present")
return True

return False

def get_requirements(folder,genome):
Expand Down

0 comments on commit a99e528

Please sign in to comment.