GCNFrame icon indicating copy to clipboard operation
GCNFrame copied to clipboard

ModuleNotFoundError: No module named 'encode_seq'

Open alvintho opened this issue 10 months ago • 0 comments

Environment:

  1. Visual Studio Code
  2. macOS Sequoia 15.3
  3. Python 3.8.3

Description

Faced module not found error for encode_seq and process keeps running for ~40 mins. Have followed README docs for execution. May I know where did I do wrong in this case?

Screenshots

After cloning & setup:

Image

After running GCNFrame using example data:

Image

To Reproduce

  1. Package installation
%pip install --upgrade pip
%pip install cython
%pip install numpy
%pip install biopython==1.78
%pip install editdistance
%pip install torch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2
%pip install torch_geometric==1.7.0
%pip install --upgrade pip setuptools wheel
%pip install ninja
%pip install cmake
%pip install torch-sparse==0.6.9
%pip install torch-scatter==2.0.7
  1. Run GCNFrame
git clone https://github.com/deepomicslab/GCNFrame.git
cd GCNFrame/GCNFrame
python setup.py build_ext --inplace
cd ../

from GCNFrame import Biodata, GCNmodel
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

data = Biodata(fasta_file="example_data/nature_2017.fasta", 
        label_file="example_data/lifestyle_label.txt",
        feature_file="example_data/CDD_protein_feature.txt")
dataset = data.encode(thread=20)
model = GCNmodel.model(label_num=2, other_feature_dim=206).to(device)
GCNmodel.train(dataset, model, weighted_sampling=True)
GCNmodel.test(model_name="GCN_model.pt", fasta_file="example_data/nature_2017.fasta", feature_file="example_data/CDD_protein_feature.txt")

alvintho avatar Feb 27 '25 14:02 alvintho