Skip to content

Commit

Permalink
Prepend database directory path on to relative paths for allele fasta…
Browse files Browse the repository at this point in the history
… files in db
  • Loading branch information
dfornika committed Mar 22, 2018
1 parent 93854f9 commit 2dcd029
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/calling_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ function run_calling_pipeline(args)

# check if DB and fastq files exist:
check_files([args["db"];[fastq for fq_files in values(sample_files) for fastq in fq_files]])
db_path = dirname(args["db"])
# array for saving each sample result:
sample_results = []
info("Opening kmer database ... ")
kmer_db, loci, loci2alleles, k, profile, build_args = open_db(args["db"])

# prepend base path of the kmer database on to the relative paths for allele fasta files stored in the db
for (index, file) in enumerate(build_args["fasta_files"])
build_args["fasta_files"][index] = dirname(args["db"]) * "/" * file
end
# process each sample:
for (sample, fq_files) in sample_files
info("Sample: $sample. Opening fastq file(s) and counting kmers ... ")
Expand Down

0 comments on commit 2dcd029

Please sign in to comment.