Hi
I have an assembled genome with FASTA headers which cant be described by a wild-card.
So I can run something like chr(1..20) for parallelizing.
I found somewhere a solution similar to the below:
chr(chromosome)*[myTaks]
I believe that I could get my individual annotation with a stage like:
myChrom = {
doc "defines the chromosome or better contigs of our assembled genome for further splitting"
exec """
grep "^>" $input.fasta | perl -npe 's/\\>//' > ${output(chromosomes.txt)}
"""
chromosomes = new File("${output(chromosomes.txt)}").text.split("\\n")
forward input
}
The major problem I am facing, is that my script wont run because the variable chromsome is obviously not defined at run-time as I am generating it later.
Any way to circumvent this ?