-
Notifications
You must be signed in to change notification settings - Fork 0
/
eprint_samples.py
36 lines (27 loc) · 901 Bytes
/
eprint_samples.py
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
from pathlib import Path
import json
files = sorted(Path('/groups/cgsd/alexandre/EPRINT_workflow/inputs/10774_ep').glob('*R2*'))
p = Path('inputs','adapters.txt')
adapters = []
with p.open() as f:
for adapter in f:
adapters.append(adapter.strip())
def create_data():
data = []
for file in files:
data.append(
{
"Eprint.hg19_tar": "/groups/cgsd/alexandre/EPRINT_workflow/inputs/HG19.tar",
"Eprint.hg19_dup_tar": "/groups/cgsd/alexandre/EPRINT_workflow/inputs/REP.tar",
"Eprint.samples": {
"fastq_r2": f"{file}",
"adapters": adapters,
"bc_pattern": "NNNNNNNNNN"
}
}
)
return data
if __name__=='__main__':
output = Path('eprint_ALS.json')
with output.open('w') as f:
json.dump(create_data(),f,indent=4)