-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgut-demo.ngl
47 lines (33 loc) · 1.06 KB
/
gut-demo.ngl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
ngless "1.1"
import "parallel" version "1.0"
import "mocat" version "1.0"
import "motus" version "0.1"
import "igc" version "1.0"
samples = readlines('igc.demo.short')
sample = lock1(samples)
input = load_mocat_sample(sample)
input = preprocess(input, keep_singles=False) using |read|:
read = substrim(read, min_quality=25)
if len(read) < 45:
discard
mapped = map(input, reference='hg19')
mapped = select(mapped) using |mr|:
mr = mr.filter(min_match_size=45, min_identity_pc=90, action={unmatch})
if mr.flag({mapped}):
discard
input = as_reads(mapped)
mapped = map(input, reference='igc', mode_all=True)
counts = count(mapped,
features=['OGs'],
normalization={scaled})
collect(counts,
current=sample,
allneeded=samples,
ofile='igc.profiles.txt')
mapped = map(input, reference='motus', mode_all=True)
counted = count(mapped, features=['gene'], multiple={dist1})
motus_table = motus(counted)
collect(motus_table,
current=sample,
allneeded=samples,
ofile='motus-counts.txt')