It seems that in case of subsampling there is automatically a suffix .subsampled added to the output filename. While in general it is a good idea to make it obvious that it is not a full result, it backfires when ngless tries to format the filename (inserting pair.1, pair.2 and singles):
_formatFQOname base insert
| "{index}" `isInfixOf` base = return $ replace "{index}" insert base
| endswith ".fq" base = return $ removeEnd base ".fq" ++ "." ++ insert ++ ".fq"
| endswith ".fq.gz" base = return $ removeEnd base ".fq.gz" ++ "." ++ insert ++ ".fq.gz"
| endswith ".fq.bz2" base = return $ removeEnd base ".fq.bz2" ++ "." ++ insert ++ ".fq.bz2"
| otherwise = throwScriptError ("Cannot handle filename " ++ base ++ " (expected extension .fq/.fq.gz/.fq.bz2).")
Which then results in the following error message:
It seems that in case of subsampling there is automatically a suffix
.subsampled
added to the output filename. While in general it is a good idea to make it obvious that it is not a full result, it backfires when ngless tries to format the filename (insertingpair.1
,pair.2
andsingles
):Which then results in the following error message:
And a small example script which results in the above error: