I'm trying to run needle using Biopython's NeedleCommandline. The two input files are tempfile.NamedTemporaryFiles.
cline = NeedleCommandline(asequence=gene_fasta.name, bsequence=chain_fasta.name, gapopen=10, gapextend=1, stdout=True) stdout, stderr = cline()
"Bio.Application.ApplicationError: Command 'needle -stdout -asequence=/var/folders/zm/jvdqjg5j3kg67_pxlsjc84c40000gn/T/tmpQXYVkP -bsequence=/var/folders/zm/jvdqjg5j3kg67_pxlsjc84c40000gn/T/tmpcVFncj -gapopen=10 -gapextend=1' returned non-zero exit status 1, 'Needleman-Wunsch global alignment of two sequences'"
I tried running the same command by hand (after setting the NamedTemporaryFile(delete=False) in both files) and it runs just fine. I also tried using an output file (with outfile="xxx.needle" in NeedleCommandline) but it still doesn't work.
I also verified the return code when running it manually by 'echo $#' and it is 0.