Hello,
I have this nf script below that has a simple python process that starts by importing pandas then reading a csv file. The conda environment that I utilize is created is in the config file. However, everytime I run the nf script it produces an error no module names pandas.
#!/usr/bin/env nextflow
process PYMANIFESTCREATOR {
debug true
label 'pandasenv'
input:
path manifesto_file
output:
stdout
script:
"""
#!/usr/bin/env python3
try:
import pandas as pd
from pathlib import Path
import shutil
import glob
import os
print("All necessary modules imported successfully.")
except ImportError as e:
print(f"An error occurred while importing modules: {e}")
manifest_csv = "$manifesto_file"
print(manifest_csv)
"""
}
workflow {
input_ch = channel.fromPath("$projectDir/*_Manifest.csv")
PYMANIFESTCREATOR(input_ch)
}
nextflow.config
profiles{
singularity{
singularity.enabled = true
process{
process.executor = 'slurm'
withLabel: qiime {
cpus = 10
memory = 100.GB
container = '/uufs/chpc.utah.edu/common/home/kapheim-group2/Sief/nextflow_script/singularity/amplicon_latest.sif'
}
}
}
conda{
conda.enabled = true
process{
process.executor = 'slurm'
withLabel: pandasenv{
cpus = 10
memory = 50.GB
conda = '/uufs/chpc.utah.edu/common/home/u6060645/software/pkg/miniconda3/envs/pandaenv'
}
}
}
}