cbg-ethz / V-pipe

V-pipe is a pipeline designed for analysing NGS data of short viral genomes
https://cbg-ethz.github.io/V-pipe/
Apache License 2.0
129 stars 43 forks source link

Conflict in quality_assurance.smk with custom datadir-path #127

Closed LaraFuhrmann closed 1 year ago

LaraFuhrmann commented 2 years ago

When defining datadir different from samples/ in the config.yaml, e.g.

input:
      reference: ../../resources/reference/ancestor_consensus.fasta
      datadir: ../../resources/samples/Experiment3

the function len_cutoff() in quality_assurance.smk is taking the wrong part of the splitted string:

def len_cutoff(wildcards):
    parts = wildcards.dataset.split("/")
    patient_ID = parts[1] # should be: patient_ID = parts[-2]  
    date = parts[2] # should be: date = parts[-1]

Instead of

 patient_ID = parts[1] 
 date = parts[2] 

it should be

patient_ID = parts[-2]  
date = parts[-1]