1 SAMPLEID
:= mbrain mkidney
2 LANEID_Illumina
:= L001
3 LANEID_Salus
:= L001 L002 L003 L004
4 PLATFORMS
:= Illumina Salus
7 TAGS_
$1 := $$(foreach s
, $$(SAMPLEID
), $1/$$(s
)_S1_L001
)
9 $(foreach platform
,$(PLATFORMS
),$(eval
$(call platform_rule
,$(platform
))))
10 ALLTAGS
:= $(TAGS_Illumina
) $(TAGS_Salus
)
12 RAW_Salus
:= $(foreach a
, $(SAMPLEID
), $(foreach b
, $(LANEID_Salus
), $(foreach r
,R1 R2
,raw4_Salus
/$(a
)_S1_
$(b
)_
$(r
)_001.fastq.gz
)))
13 MERGE_Salus
:= $(foreach tag
,$(TAGS_Salus
),raw_
$(tag
) )
14 MERGE_Illumina
:= $(foreach a
, $(SAMPLEID
), $(foreach r
,R1 R2
,raw_Illumina
/$(a
)_S1_L001
))
15 FASTP_TAGS
:= $(foreach tag
,$(ALLTAGS
),fastp_
$(tag
) )
16 FQ_DIRS
:= $(foreach p
,raw fastp sub
,$(foreach pf
,$(PLATFORMS
),$(p
)_
$(pf
)))
18 all: $(MERGE_Salus
) $(FASTP_TAGS
) $(foreach d
,$(FQ_DIRS
),$(d
).stats
)
22 raw_Salus
/$1_S1_L001: $$(filter raw4_Salus
/$1_S1_%,$$(RAW_Salus
))
24 @cat
$$(filter %_R1_001.fastq.gz
,$$^
) > $$@_R1_001.fastq.gz
25 @cat
$$(filter %_R2_001.fastq.gz
,$$^
) > $$@_R2_001.fastq.gz
27 .PHONY raw_Illumina
/$1_S1_L001:
29 sub_Illumina
/$1_S1_L001: $$(filter fastp_Illumina
/$1_S1_L001,$$(FASTP_TAGS
))
31 cp
--reflink
=auto
-l
$$^_R1_001.cut.gz
$$@_R1_001.fastq.gz
32 cp
--reflink
=auto
-l
$$^_R2_001.cut.gz
$$@_R2_001.fastq.gz
35 $(foreach sample
, $(SAMPLEID
), $(eval
$(call smp_rule
,$(sample
))))
38 fastp_
$1/$2_S1_L001: $$(filter raw_
$1/$2_S1_L001,$$(MERGE_Salus
) $$(MERGE_Illumina
))
40 micromamba run
-n salus fastp
--thread
4 -z
4 -A
--max_len1
28 --max_len2
0 --dont_eval_duplication
-q
20 -u
82 -n
4 --average_qual
20 --length_required
28 -y
-Y
30 -g
-x \
41 -i
$$<_R1_001.fastq.gz
-I
$$<_R2_001.fastq.gz
-o
$$@_R1_001.fastp.gz
-O
$$@_R2_001.fastp.gz
-j
$$@.fastp.json
-h
$$@.fastp.html
2>$$@.fastp.log
42 micromamba run
-n salus cutadapt
-Z
-j8
--pair-filter
=any
--minimum-length
28:50 --length
100 --times
0 --report full
--json
=$$@.cut.json \
43 -o
$$@_R1_001.cut.gz
-p
$$@_R2_001.cut.gz
$$@_R1_001.fastp.gz
$$@_R2_001.fastp.gz
>$$@.cut.log
46 $(foreach pf
, $(PLATFORMS
), $(foreach sample
, $(SAMPLEID
), $(eval
$(call pf_smp_rule
,$(pf
),$(sample
)))) )
50 $(foreach pf
, $(PLATFORMS
), $(eval
$(call pf_rule
,$(pf
))))
52 sub_Salus
/mbrain_S1_L001
: $(filter fastp_Salus
/mbrain_S1_L001
,$(FASTP_TAGS
))
54 micromamba run
-n salus seqkit
--compress-level
4 -o
$@_R1_001.fastq.gz
-w
200 -j
1 sample
-p
0.72 -s
123456 $^_R1_001.cut.gz
55 micromamba run
-n salus seqkit
--compress-level
4 -o
$@_R2_001.fastq.gz
-w
200 -j
1 sample
-p
0.72 -s
123456 $^_R2_001.cut.gz
58 sub_Salus
/mkidney_S1_L001
: $(filter fastp_Salus
/mkidney_S1_L001
,$(FASTP_TAGS
))
60 micromamba run
-n salus seqkit
--compress-level
4 -o
$@_R1_001.fastq.gz
-w
200 -j
1 sample
-p
0.76 -s
123456 $^_R1_001.cut.gz
61 micromamba run
-n salus seqkit
--compress-level
4 -o
$@_R2_001.fastq.gz
-w
200 -j
1 sample
-p
0.76 -s
123456 $^_R2_001.cut.gz
64 %.stats
: $(foreach sample
, $(SAMPLEID
), %/$(sample
)_S1_L001
)
65 micromamba run
-n salus seqkit stats
-a
-o
$@
-j8
$(dir $<)*.gz
68 scp makefile s0
:/share
/result
/spatial
/data
/BoAo_sp
/sub
/