Question: EMBOSS Needle: Read sequences from stdin
1
gravatar for pld
4.8 years ago by
pld4.8k
United States
pld4.8k wrote:

Is it possible to pass sequences through needle via stdin? I have a great deal of all to all runs to make and I don't want to generate an enormous number of files, or make temporary files.

 

I've tried cat seq1.fasta seq2.fasta | needle -filter... but it throws errors.

emboss unix stdin needle linux • 2.5k views
ADD COMMENTlink modified 4.8 years ago by brentp22k • written 4.8 years ago by pld4.8k

Pasted as an answer

ADD REPLYlink modified 4.8 years ago • written 4.8 years ago by Ashutosh Pandey11k
2
gravatar for Alex Reynolds
4.8 years ago by
Alex Reynolds27k
Seattle, WA USA
Alex Reynolds27k wrote:

Perhaps look into using mkfifo to set up named pipes to stream data to placeholder files, which can be used with some tools that do not read streams: http://en.wikipedia.org/wiki/Named_pipe

ADD COMMENTlink modified 4.8 years ago • written 4.8 years ago by Alex Reynolds27k
2
gravatar for brentp
4.8 years ago by
brentp22k
Salt Lake City, UT
brentp22k wrote:

 

needle -filter <(echo -e ">a\nCAAAAAAAAATTAAAAAAAAAAAAAACCCCCCCTTCCA") \
               <(echo -e ">a\nCAAAAGGAAAAATTAAAAAAAAAAAAAACCCCCCCTTCCA")

ADD COMMENTlink written 4.8 years ago by brentp22k
0
gravatar for Ashutosh Pandey
4.8 years ago by
Philadelphia
Ashutosh Pandey11k wrote:

needle takes two files as input. First file contains sequence to be aligned to the sequence or sequences in the second file. The first file can contain only one sequence and the second file can contain multiple sequences and needle will align the sequence from the first file to every sequence in the second file. Now coming to your question:

"filter" option only lets you to give the first sequence as a standard input. Here you are giving both the sequences as a standard input and as a result needle is not being able to detect the second input. 

You can try:

needle "cat seq1.fasta |" "cat seq.2fasta |"

ADD COMMENTlink modified 4.8 years ago • written 4.8 years ago by Ashutosh Pandey11k

I just checked the command and its working but you will have to use "-auto" in the command line to turn off the prompts. For e.g. needle -auto "cat seq1.fasta |" "cat seq.2fasta |"

ADD REPLYlink written 4.8 years ago by Ashutosh Pandey11k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1756 users visited in the last hour