isovic / racon

Ultrafast consensus module for raw de novo genome assembly of long uncorrected reads. http://genome.cshlp.org/content/early/2017/01/18/gr.214270.116 Note: This was the original repository which will no longer be officially maintained. Please use the new official repository here:
https://github.com/lbcb-sci/racon
MIT License
269 stars 49 forks source link

--output option? #191

Closed ranlib closed 3 years ago

ranlib commented 3 years ago

I am using racon 1.4.21 I noticed that racon writes output to stdout. If I redirect the output to a file I find that lines that are not fasta output are included. See below for an example. How about a --output option to get the fasta output while error or log messages are still send to stdout?

[racon::Polisher::initialize] loaded target sequences 0.068443 s [racon::Polisher::initialize] loaded sequences 0.790975 s [racon::Polisher::initialize] loaded overlaps 0.619227 s [racon::Polisher::initialize] aligning overlaps [=> ] 0.273249 s^M[racon::Polisher::initialize] aligning overlaps [==> ] 0.273304 s^M[racon::Polisher::initialize] alignin [racon::Polisher::initialize] transformed data into windows 0.078060 s [racon::Polisher::polish] generating consensus [=> ] 1.051718 s^M[racon::Polisher::polish] generating consensus [==> ] 1.054752 s^M[racon::Polisher::polish] generating co

contig_1 LN:i:961746 RC:i:563 XC:f:0.989605 TCGCCAAGCTGCGCCTGCTGCTGGTGGAGGAGAAGGCGCGCGGGCTCGGCGTCGGCCGCGCCCTGGTCGAGCAATGCATCCGCGCCGCGCGCGAGAAGGGCTACAAAAAGATGACGCTGTGGACCCAGAGCATCCTGGTCGCCGCGCGCGGCATCTACGCCCGCGCCGGTTTTCAGCGGGTGAAAGAAGAGAAGCATCACAGC

rvaser commented 3 years ago

Hello, the log messages are sent to stderr, while the FASTA is sent to stdout. You can split them with racon <params> > out.fasta 2> log. Hope this helps.

Best regards, Robert

ranlib commented 3 years ago

I had tried that, but it didn't work for me. I am running racon in a docker image: docker run --rm -it -v $PWD:/mnt -w /mnt racon:v1.4.21 racon $FASTQ ${OUTPUT}/aln.sam $ASSEMBLY > racon.out I can grep out the Polisher message lines from racon.out and produce a proper fasta file. But I think racon would be easier to use if we have an output file option.

ranlib commented 3 years ago

I solved my issue: I needed to run docker without the -t option, then stdout and stderr are separate again.

rvaser commented 3 years ago

I am glad that it works :)