Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File "./process_screen.py", line 46, in <module> import compressed_file_opener as cfo ImportError: No module named compressed_file_opener #3

Open
Owuorgpo opened this issue Sep 25, 2019 · 9 comments

Comments

@Owuorgpo
Copy link

Hi,
For some reason, I keep getting this error when running the process_screen.py. Are these part of the BEAN packages? I am unable to find a way to install them in my system.
import compressed_file_opener as cfo
import cg_file_tools as cg_file
import cluster_dataset_wrappers as clus_wrap
from cg_common_functions import get_sample_table, parse_yaml
from version_printing import update_version_file

@RussianImperialScott
Copy link
Member

Hi Peter!

If you're having issues importing those modules, my first guess would be that the BARSEQ_PATH variable is not pointing to the main BEAN-counter directory. The BEAN-counter scripts use this variable to know where to look for the modules that you're having trouble importing at the moment. So I can better help, are you running this on linux, mac, or windows?

I need to update the README page, but we published a protocol earlier this year containing much more detailed instructions here: https://doi.org/10.1038/s41596-018-0099-1. If you do not have access to the journal, please let me know and I can send you a copy (there should also be a free version of the protocol posted to PubMed Central within a few weeks).

Thanks!
Scott

@Owuorgpo
Copy link
Author

Owuorgpo commented Sep 25, 2019 via email

@RussianImperialScott
Copy link
Member

Oh awesome, glad that this is (hopefully) useful! Perhaps the BARSEQ_PATH environment variable is not being set properly in the job submission process? I can certainly take a look at your script to see what might be happening.

@Owuorgpo
Copy link
Author

Owuorgpo commented Sep 25, 2019 via email

@RussianImperialScott
Copy link
Member

I don't think the script came through as an attachment. Is it short enough to paste in a comment?

@Owuorgpo
Copy link
Author

Here is how am setting my bash script:

#!/usr/bin/env bash
#SBATCH -J SeekDeep
#SBATCH --time=12:00:00
#SBATCH --nodes=2
#SBATCH --tasks-per-node=8
#SBATCH -o SeekDeep-%j.out
#SBATCH -e SeekDeep-%j.err

#setting BARSEQ_PATH variable path
export PATH=path/to/BEAN-counter/master_scripts:$PATH
export BARSEQ_PATH=path/to/BEAN-counter/master_scripts

I am then calling the pipeline here:
./process_screen.py config_file.yaml

And here is how the config_file.yaml has been edited.
output_folder: output
sample_table_file: sample_table/sample_table_filtered.txt
lane_location_file: config_files/lane_locations.txt
amplicon_struct_file: config_files/amplicon_struct.yaml
gene_barcode_file: barcodes/barcodes.txt

@RussianImperialScott
Copy link
Member

Ah! Use

export BARSEQ_PATH=path/to/BEAN-counter/

instead of

export BARSEQ_PATH=path/to/BEAN-counter/master_scripts

@Owuorgpo
Copy link
Author

Thanks!
Funny that the process_screen.py only moved two lines and failed to load packages again after changing as indicated above.
ImportError: No module named fastcluster

@Owuorgpo
Copy link
Author

Owuorgpo commented Sep 26, 2019

@RussianImperialScott I figured this out. Was just missing some of the python packages. Now the pipeline is working but for some reason, it is not working with lane files. See error below
KeyError: 'lane'

params = yaml.load(f)
clustering lane1 z-score matrix...
could not find 'lane1' zscore matrix
clustering lane2 z-score matrix...
could not find 'lane2' zscore matrix
clustering lane3 z-score matrix...
could not find 'lane3' zscore matrix
clustering lane4 z-score matrix...
could not find 'lane4' zscore matrix
clustering lane5 z-score matrix...
could not find 'lane5' zscore matrix
clustering lane6 z-score matrix...
could not find 'lane6' zscore matrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants