allind / EukDetect

MIT License
45 stars 16 forks source link

eukdetect-db failing at bedtools getfasta #49

Open ailtonpcf opened 5 months ago

ailtonpcf commented 5 months ago

Dear Dr. Lind,

I'm currently experiencing issues with bedtools getfasta:

`rule from_bed_to_fasta: input: cache/45-create-eukdetect-db/from-tbl-to-bed.done, /work/qi47rin/proj/02-compost-microbes/cache/28-kuniq-all-kings-db-not-masked/all-kingdoms-genome/library/fungi/Chromosome/Aspergillus_niger_strain_KYF3-tax5061-GCA_029783925.1_ASM2978392v1_genomic.fna output: cache/45-create-eukdetect-db/bed-fasta/fungi--Chromosome--Aspergillus_niger_strain_KYF3-tax5061-GCA_029783925.1_ASM2978392v1_genomic.fna jobid: 0 reason: Missing output files: cache/45-create-eukdetect-db/bed-fasta/fungi--Chromosome--Aspergillus_niger_strain_KYF3-tax5061-GCA_029783925.1_ASM2978392v1_genomic.fna wildcards: KINGDOM=fungi, LEVEL=Chromosome, GENOME=Aspergillus_niger_strain_KYF3-tax5061-GCA_029783925.1_ASM2978392v1_genomic resources: mem_mb=10000, disk_mb=0, tmpdir=/scratch/qi47rin, partition=standard, qos=normal, time=3-00:00:0

    bedtools getfasta -nameOnly -s -fi /work/qi47rin/proj/02-compost-microbes/cache/28-kuniq-all-kings-db-not-masked/all-kingdoms-genome/library/fungi/Chromosome/Aspergillus_niger_strain_KYF3-tax5061-GCA_029783925.1_ASM2978392v1_genomic.fna -bed cache/45-create-eukdetect-db/bed-annotations/fungi--Chromosome--Aspergillus_niger_strain_KYF3-tax5061-GCA_029783925.1_ASM2978392v1_genomic.bed -fo cache/45-create-eukdetect-db/bed-fasta/fungi--Chromosome--Aspergillus_niger_strain_KYF3-tax5061-GCA_029783925.1_ASM2978392v1_genomic.fna

Error: malformed BED entry at line 2. Start was greater than end. Exiting.`

The way I manage was:

awk 'BEGIN {OFS="\\t"} {if ($2 > $3) {print $1, $3, $2, $4, $5, $6} else {print $0}}' input.bed > fixed.bed

Perhaps it might be useful for others.

Do you have by any chance the conda recipe for all the tools required for the database construction?

Bests, Ailton.