Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Channel question on result file in directory result of programe #28

Closed
biowang opened this issue Feb 6, 2015 · 2 comments
Closed

Channel question on result file in directory result of programe #28

biowang opened this issue Feb 6, 2015 · 2 comments

Comments

@biowang
Copy link

biowang commented Feb 6, 2015

I don`t know how do I put file into channel, the file lie in a directory.
while directory is a parameter rather than a file.

such as programe "tophat ".
the command line like following:
$ tophat -o tophat_out genome_index R1.fq R2.fq

the result like this

tophat_out/:
accepted_hits.bam deletions.bed junctions.bed prep_reads.info

align_summary.txt insertions.bed logs unmapped.bam

then I want pass the file "accepted_hits.bam" into a Channel, How should I do?

hearing from you!

@pprieto
Copy link

pprieto commented Feb 6, 2015

Hi
If you want to pass "accepted_hits.bam" through an output Channel within a process you have to define it in the output declarations as in this example where the acceptem_hits.bam is going to be sent through channel bam

process mapping {
input:
...
output:
file "tophat_out/accepted_hits.bam" into bam

"""
tophat2 -p ${task.cpus} --GTF $annotation_file genome.index ${read1} ${read2}
"""
}

@pditommaso
Copy link
Member

There's no distinction between regular files and directories. They can be managed in the same identical manner by Nextflow channels.

You may want to have a look to this RNA-Seq example, that uses Tophat, at this link:
https://github.com/nextflow-io/rnatoy/blob/master/main.nf

Feel free to continue the discussion in the Nextflow forum:
https://groups.google.com/forum/#!forum/nextflow

@nextflow-io nextflow-io locked and limited conversation to collaborators Feb 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants