how to pair reads files that come out from a process? the fromFilePairs() appears cannot take process output. #3053
-
I have a process, that is download reads from a internal data repository, then they are output into a reads channel. how I can build reads pair out of this output just the similar format as it is handled by fromFilePairs() method. the content of the channel looks like this: |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
You probably can't use
You will then have tuples like |
Beta Was this translation helpful? Give feedback.
-
thanks @bentsherman, just tried .map().groupTuple() approach and it did the trick, sometime I do need the pairs in certain order e.g. a_1.fq a_2.fq. not the other way. do you have any suggestion what type of logic I can use here? |
Beta Was this translation helpful? Give feedback.
-
You will need another |
Beta Was this translation helpful? Give feedback.
-
I have a very similar problem, but it's not obvious to me what the map syntax should be. I have one process that outputs a tuple that looks like: [reads_id, and I want to split that into R1,R2 read pairs to send to the next process. As you suggest, so comination of map and groupTuple should do it, but the exact syntax in eluding me. Thanks for any help. |
Beta Was this translation helpful? Give feedback.
-
I think I was cc'ed unto this thread by mistake. Would you be able to
remove me?
…On Fri, Jan 6, 2023, 3:52 PM paulmunn ***@***.***> wrote:
That looks like what I need - I'll give it a try. Thanks!
—
Reply to this email directly, view it on GitHub
<#3053 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMS3UARDXMFBQABV4LXX2I3WRCAYDANCNFSM6AAAAAATICHKXQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
You probably can't use
fromFilePairs
directly because it is a channel factory, not an operator. However you should be able to chain together some operators to get the same behavior. Here is a sketch:['gut', 'new_gut_2.fq']
groupTuple
to group each pair by tissue typeYou will then have tuples like
['gut', 'new_gut_1.fq', 'new_gut_2.fq']
. You may need some extra logic to make sure they are in order, and from there you can manipulate the tuple however you want.