rajewsky-lab / spacemake

Other
39 stars 11 forks source link

SpacemakeError in get_mapped_BAM_output #126

Open NmnBttr opened 1 week ago

NmnBttr commented 1 week ago

Hi,

thank you for this great tool.

I am running spacemake for an openST data and encountering the following Error when running spacemake run --cores 8:

KeyError in line 286 of /home/user/.conda/envs/spacemake/lib/python3.10/site-packages/spacemake/snakemake/mapping.smk:
'bowtie2'
  File "/home/user/.conda/envs/spacemake/lib/python3.10/site-packages/spacemake/snakemake/main.smk", line 91, in <module>
  File "/home/user/.conda/envs/spacemake/lib/python3.10/site-packages/spacemake/snakemake/mapping.smk", line 601, in <module>
  File "/home/user.conda/envs/spacemake/lib/python3.10/site-packages/spacemake/snakemake/mapping.smk", line 286, in get_mapped_BAM_output
ERROR: SpacemakeError
an error occurred while snakemake() ran

I initialized spacemake with --download_species --dropseq_tools path/to/dropseqtools flags and added the sample like this before running spacemake run:

spacemake projects add_sample --project_id ProjectID --sample_id Sample-S1 \
--barcode_flavor openst --puck openst --puck_barcode_file $BARCODE \
--run_mode openst --species human \
--map_strategy="rRNA:bowtie2->genome:STAR" --R1 $S1_R1 --R2 $S1_R2

I checked the snakemake .log file too but it contained the same error as above.

Can you please help me with this?

Thank you in advance!

Best, Namuun

nukappa commented 1 week ago

Hi @NmnBttr , did you add an RNA genome sequence to the species? If not, you can do so by using the spacemake config add_species command.

NmnBttr commented 3 days ago

Thank you! I did miss this step. Now I added the rRNA seq by following the steps as described here. This is now the list of my species.

Listing species
human:
  genome:
    annotation: species_data/human/human_annotation.gtf
    sequence: species_data/human/human_genome.fa
  rRNA:
    annotation: ''
    sequence: species_data/human/human.rRNA.fa
mouse:
  genome:
    annotation: species_data/mouse/mouse_annotation.gtf
    sequence: species_data/mouse/mouse_genome.fa

However, when running spacemake run --cores 8 after adding the samples I am still getting the same error message as above.

nukappa commented 1 day ago

Do you have mouse samples too? If they have rRNA in the map_strategy, then you'd need to add an rRNA seq for that too.

NmnBttr commented 1 day ago

I only have human sample. The mouse reference was just downloaded with the --download_species flag.

nukappa commented 1 day ago

Can you verify that you're using version=0.7.9 ? If not, can you upgrade and try again?

nukappa commented 1 day ago

Never mind, just saw your map_strategy looks "inverse", please modify it to the following: bowtie2:rRNA->STAR:genome:final

NmnBttr commented 1 day ago

ah ok I will try it out now and will let you know. Thank you!