ngl string replace

5 views
Skip to first unread message

ullo...@googlemail.com

unread,
Feb 15, 2022, 10:39:03 AM2/15/22
to NGLess
Dear all,
Is there a syntax to do string replacements, e.g. reading in a sample file and replacing the path within the ngl script?
example:
samples = readlines('samplelist.txt')
#head samplelist.txt
#X204SC-Z01-F002_02/raw_data/muer1
#X204SC-Z01-F002_02/raw_data/muer2
#X204SC-Z01-F002_02/raw_data/muer3
#X204SC-Z01-F002_03/raw_data/muer4
...
current = lock1(samples)
input = load_fastq_directory(current)

RESULTS = ('muer1','muer2','muer3',...) # automatically

or out:
#X204SC-Z01-F002_02/preprocessed/muer1
#X204SC-Z01-F002_02/preprocessed/muer2
#X204SC-Z01-F002_02/preprocessed/muer3
#X204SC-Z01-F002_03/preprocessed/muer4
Best,
Ulrike

Luis Pedro Coelho

unread,
Feb 16, 2022, 5:12:32 AM2/16/22
to NGLess List
Currently, no; but this is not a bad idea for a future version.

Best
Luis

Luis Pedro Coelho | Fudan University | http://luispedro.org
--
You received this message because you are subscribed to the Google Groups "NGLess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngless+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages