MikkelSchubert / paleomix

Pipelines and tools for the processing of ancient and modern HTS data.
https://paleomix.readthedocs.io/en/stable/
MIT License
43 stars 19 forks source link

bam_pipeline error #22

Closed denise0593 closed 4 years ago

denise0593 commented 4 years ago

Hi, I'm trying to use paleomix on my data, but I'm getting this error:

Reading makefiles ... Error reading makefiles: MakefileError: Inconsistency between makefile specification and current makefile at root:CGF279_FagioloAntico:CGF279_FagioloAntico:Lane_1: Expected dict, found str '/home/denise.lavezzari/Projects/CGF279_FagioloAntico/fastq/Fagiolo_Antico_ID_S72R{Pair}*.fastq.gz'!

Here my yaml file: 000_makefile_template.txt

Thank you, Denise

MikkelSchubert commented 4 years ago

Hi Denise,

The problem is that you've indented 'Lane_1' one level to few, which would make 'Lane_1' another library. I've cleaned up the indentation in your file to make this clear (without comments):

CGF279_FagioloAntico:
    CGF279_FagioloAntico:
        Fagiolo_Antico_ID_S72:
            Options: 
                RescaleQualities: yes
                Aligners:
                    BWA: 
                        UseSeed: no
        Lane_1: /home/denise.lavezzari/Projects/CGF279_FagioloAntico/fastq/Fagiolo_Antico_ID_S72_R{Pair}_*.fastq.gz

'Lane_1' should be indented the same amount as 'Options', like this:

CGF279_FagioloAntico:
    CGF279_FagioloAntico:
        Fagiolo_Antico_ID_S72:
            Options: 
                RescaleQualities: yes
                Aligners:
                    BWA: 
                        UseSeed: no
            Lane_1: /home/denise.lavezzari/Projects/CGF279_FagioloAntico/fastq/Fagiolo_Antico_ID_S72_R{Pair}_*.fastq.gz

Try to keep your indentation consistent, that makes it much easier to read the file and to spot mistakes.

Best regards, Mikkel

denise0593 commented 4 years ago

Thank you very much! Best Regards, Denise

juanfmasello commented 2 months ago

Hi Mikkel,

I have a similar problem:

ERROR Error reading makefiles: Inconsistency between makefile specification and current makefile at Genomes :: desolata :: Path: Expected dict, found str 'reference_genomes/pa_de.fa'!

My yaml file is attached. prion_short_reads_mapping_against_desolata.yaml.txt

I've checked the indentation using RStudio and it looks fine. But, probably, I am missing something.

I will greatly appreciate your suggestions.

Cheers, Juan

MikkelSchubert commented 2 months ago

Hi @juanfmasello,

What version of paleomix are you using? You can check with the command paleomix --version.

The yaml file layout matches what is expected when using the development version (master branch on github, v2.0.0a0 where the a0 indicates that it's an alpha version), but the error message could suggest that you are attempting to use an older version of paleomix such as v1.3.8.

juanfmasello commented 2 months ago

Hi, thank you for such prompt answer. Much appreciated! Yes, I am using paleomix v1.3.8. Which layout should I use for that version? Cheers, Juan

MikkelSchubert commented 2 months ago

Hi, thank you for such prompt answer. Much appreciated! Yes, I am using paleomix v1.3.8. Which layout should I use for that version? Cheers, Juan

The original YAML file format is described in the template files themselves and in https://paleomix.readthedocs.io/en/stable/bam_pipeline/makefile.html and has a number of differences from the development version. Off the top of my head, that includes Genomes being called Prefixes and the Samples subsection not existing, instead v1.3.8 uses expects a (typically redundant) name that is used as the output filename:

# Development version
Samples:
  461cDR:
    L137741:
      Run_1: ...
      Run_2: ...

  330cBI:
    L137742:
      Run_1: short_reads/L137742_Track-183610_{Pair}.fastq.gz
      Run_2: short_reads/L137742_Track-183955_{Pair}.fastq.gz

# v1.3.8
461cDR:
  461cDR:
    L137741:
      Run_1: ...
      Run_2: ...

330cBI:
  330cBI:
    L137742:
      Run_1: short_reads/L137742_Track-183610_{Pair}.fastq.gz
      Run_2: short_reads/L137742_Track-183955_{Pair}.fastq.gz

However, if your YAML file was written for the development version of paleomix, then I would recommend that you run it using that version. You can install and run it fairly easily in a virtual environment:

$ python3 -m venv venv
$ ./venv/bin/pip install git+https://github.com/MikkelSchubert/paleomix.git
$ ./venv/bin/paleomix
juanfmasello commented 2 months ago

Hi Mikkel, I followed your instructions for v1.3.8 and it solved my issues. Thank you very much! Cheers, Juan