geraldinepascal / FROGS

FROGS is a galaxy/CLI workflow designed to produce an OTUs count matrix from high depth sequencing amplicon data.
GNU General Public License v3.0
24 stars 22 forks source link

tree.py not working with Galaxy #44

Open loraine-gueguen opened 4 years ago

loraine-gueguen commented 4 years ago

Redirecting mafft standard error to output directory gives an error: https://github.com/geraldinepascal/FROGS/blob/master/tools/tree/tree.py#L276

Fatal error: Exit code 1 ()
Traceback (most recent call last):
  File "/w/conda/galaxy4frogs/_conda/envs/__frogs@3.1.0/bin/tree.py", line 298, in <module>
    Mafft(mafftMet, args.input_otu, align, args.nb_cpus, stderr).submit( args.log_file )
  File "/w/conda/galaxy4frogs/_conda/envs/__frogs@3.1.0/lib/frogsUtils.py", line 141, in submit
    subprocess.check_output( self.get_cmd(), shell=True )
  File "/opt/6.x/python/lib/python2.7/subprocess.py", line 544, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'mafft --maxiterate 1000 --globalpair --thread 1 /w/galaxy/galaxy4frogs/galaxy-dist/database/files/017/dataset_17743.dat > /w/galaxy/galaxy4frogs/galaxy-dist/database/files/017/1574934919.42_7093_mafft_aligned.fasta 2> /w/galaxy/galaxy4frogs/galaxy-dist/database/files/017/1574934919.42_7093_mafft.stderr' returned non-zero exit status 1

Whereas it is fine when editing tree.py to redirect standard error to /dev/nullas in release 2.0.0 : stderr = "/dev/null" instead of stderr = tmpFiles.add("mafft.stderr") https://github.com/geraldinepascal/FROGS/blob/master/tools/tree/tree.py#L276

Seems to be a permission issue. Does mafft use a specific user name in sub-processes, different from the one launching mafft ?

mariabernard commented 4 years ago

Hi Loraine,

@olivierrue told me that you have some trouble with tree.py.

I never had isue with MAFFT or tree.py and what you suggest seems weird to me, because all other tools works like that with stderr redirection to a file.

We changed stderr = "/dev/null" by stderr = tmpFiles.add("mafft.stderr") because other developper asked to for better debuging, so I am not very happy to change it back.

I will try to reproduce your problem but I am afraid I will not be able to do it before your training next week.

Could you precise me what version of MAFFT conda installed ?

loraine-gueguen commented 4 years ago

I am not very happy to change it back

sure

I am afraid I will not be able to do it before your training next week.

No problem, I have edited the file manually to make it work properly for next week.

Could you precise me what version of MAFFT conda installed ?

v7.407 (2018/Jul/23), within the __frogs@3.1.0 conda env

loraine-gueguen commented 4 years ago

copy to @lecorguille

It seems to be a problem from our galaxy server, and not from frogs. The galaxy user account cannot write into /dev/stderr:

(__frogs@3.1.0) [galaxy4frogs@galaxy4frogs ~]$ mafft --maxiterate 1000 --globalpair --thread 1 /w/galaxy/galaxy4frogs/galaxy-dist/database/files/017/dataset_17743.dat > /tmp/mafft.txt
/w/conda/galaxy4frogs/_conda/envs/__frogs@3.1.0/bin/mafft: line 2348: /dev/stderr: Permission denied
mariabernard commented 4 years ago

so, as others, you are interested in the "new" stderr redirection into stderr = tmpFiles.add("mafft.stderr")``, no ?

I am not shure to understand whether you solved your problem or non ?!

loraine-gueguen commented 4 years ago

It was probably due to bad conda initialisation in.bashrc. I will check that, but after the metabarcoding training which is currently being held