diff --git a/utils/nf-cmgg-sampletracking/nf-cmgg-sampletracking.go b/utils/nf-cmgg-sampletracking/nf-cmgg-sampletracking.go index 3af0db8..4b0f4ae 100644 --- a/utils/nf-cmgg-sampletracking/nf-cmgg-sampletracking.go +++ b/utils/nf-cmgg-sampletracking/nf-cmgg-sampletracking.go @@ -3,6 +3,7 @@ package main import ( "context" "encoding/csv" + "fmt" "io" "io/fs" "os" @@ -174,11 +175,12 @@ func main() { // Find the snp fastq for _, file := range snpFastq { if strings.Contains(file, sample.sample) { - if strings.Contains(file, "_1") { + if strings.Contains(file, "_R1") { samples[i].snpFastq1 = file - } else if strings.Contains(file, "_2") { + } else if strings.Contains(file, "_R2") { samples[i].snpFastq2 = file } + fmt.Println(sample) } } // Find the snp bam diff --git a/utils/nf-cmgg-sampletracking/sampletracking_samplesheet.csv b/utils/nf-cmgg-sampletracking/sampletracking_samplesheet.csv new file mode 100644 index 0000000..773b236 --- /dev/null +++ b/utils/nf-cmgg-sampletracking/sampletracking_samplesheet.csv @@ -0,0 +1,2 @@ +sample,pool,sample_bam,sample_bam_index,snp_fastq_1,snp_fastq_2,snp_bam,snp_bam_index +D2217639,WES_H112,test-data/sample_data/D2217639.cram,test-data/sample_data/D2217639.cram.crai,test-data/snp_data/snp_D2217639_S201_R1_001.fastq.gz,test-data/snp_data/snp_D2217639_S201_R2_001.fastq.gz,, diff --git a/utils/nf-cmgg-sampletracking/test-data/sample_data/D2217639.cram b/utils/nf-cmgg-sampletracking/test-data/sample_data/D2217639.cram new file mode 100644 index 0000000..e69de29 diff --git a/utils/nf-cmgg-sampletracking/test-data/sample_data/D2217639.cram.crai b/utils/nf-cmgg-sampletracking/test-data/sample_data/D2217639.cram.crai new file mode 100644 index 0000000..e69de29 diff --git a/utils/nf-cmgg-sampletracking/test-data/snp_data/snp_D2217639_S201_R1_001.fastq.gz b/utils/nf-cmgg-sampletracking/test-data/snp_data/snp_D2217639_S201_R1_001.fastq.gz new file mode 100644 index 0000000..e69de29 diff --git a/utils/nf-cmgg-sampletracking/test-data/snp_data/snp_D2217639_S201_R2_001.fastq.gz b/utils/nf-cmgg-sampletracking/test-data/snp_data/snp_D2217639_S201_R2_001.fastq.gz new file mode 100644 index 0000000..e69de29