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

PAScall output bed contain NAs,DeepPASS can't work? #3

Open
binghongw opened this issue Sep 8, 2021 · 6 comments
Open

PAScall output bed contain NAs,DeepPASS can't work? #3

binghongw opened this issue Sep 8, 2021 · 6 comments

Comments

@binghongw
Copy link

binghongw commented Sep 8, 2021

Hi,
I am running PAScall on bam,but the last two columns of output bed file are NAs, which can‘t be used in PASquant.
the output bed file

chr1    790085  790485  LINC01409|1|LINC01409|lncRNA|null|intron        0       +       790485  790485  0       1       400,    0,      0       NA      NA
chr1    839921  840321  LINC01128|1|LINC01128|lncRNA|null|intron        0       +       840321  840321  0       1       400,    0,      0       NA      NA 

I check the log and find that DeepPASS seemed unable to work. the log is below.

/home/soft/SCAPTURE-main/scapture_evaluate: line 87: 25568 Illegal instruction     python $DeepPASSpredict -m $DeepPASSmodel -p $PREFIX".DeepPASS" -o $PREFIX".DeepPASS.predictout" &> $PREFIX".DeepPASS.predict.log"
cat: RCC_2_cluster_2_2.exonic.peaks.DeepPASS.predictout/Predict_Result.txt: No such file or directory
/home/soft/SCAPTURE-main/scapture_evaluate: line 87: 25834 Illegal instruction     python $DeepPASSpredict -m $DeepPASSmodel -p $PREFIX".DeepPASS" -o $PREFIX".DeepPASS.predictout" &> $PREFIX".DeepPASS.predict.log"
cat: RCC_2_cluster_2_2.intronic.peaks.DeepPASS.predictout/Predict_Result.txt: No such file or directory
/home/soft/SCAPTURE-main/scapture_evaluate: line 87: 25901 Illegal instruction     python $DeepPASSpredict -m $DeepPASSmodel -p $PREFIX".DeepPASS" -o $PREFIX".DeepPASS.predictout" &> $PREFIX".DeepPASS.predict.log"
cat: RCC_2_cluster_2_2.3primeExtended.peaks.DeepPASS.predictout/Predict_Result.txt: No such file or directory

but I don't know how to solve it, any reply is appreciated!

@liguowei-CAS
Copy link
Contributor

Hi,
In PAScall step, the DeepPASS evaluation will generate *DeepPASS.log files, please paste the log information here. It will help us to figure it out.

@binghongw
Copy link
Author

Hi,
In PAScall step, the DeepPASS evaluation will generate *DeepPASS.log files, please paste the log information here. It will help us to figure it out.

Hi,
thanks for your reply, but I find the DeepPASS.predict.log is empty

@liguowei-CAS
Copy link
Contributor

liguowei-CAS commented Sep 10, 2021

Hi,
Please activate SCAPTURE_env, then check if python could successfully run the code below:

# import packages
import os
import argparse
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers, models
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession

# load model, Model_H5_File is the path to best_model.h5 in SCAPTURE package.
os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE"
best_model =  tf.keras.models.load_model(os.path.join(Model_H5_File))

The "Illegal instruction" error might occur during importing tensorflow, also see issues in Github and stackoverflow.

@binghongw
Copy link
Author

Hi,
Please activate SCAPTURE_env, then check if python could successfully run the code below:

# import packages
import os
import argparse
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers, models
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession

# load model, Model_H5_File is the path to best_model.h5 in SCAPTURE package.
os.environ["HDF5_USE_FILE_LOCKING"] = "FALSE"
best_model =  tf.keras.models.load_model(os.path.join(Model_H5_File))

The "Illegal instruction" error might occur during importing tensorflow, also see issues in Github and stackoverflow.

Hi,
thanks for your suggestion, I reinstall the tensorflow, but the DeepPASS.log showed something wrong

WARNING:tensorflow:From /home/lailab/soft/SCAPTURE-main/DeepPASS/Predict.py:55: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a futu
re version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
2021-09-14 01:11:26.680796: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the followin
g CPU instructions in performance-critical operations:  SSE3 SSE4.1 SSE4.2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-09-14 01:11:29.215434: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set

********************** Start Data Processing **************************
Traceback (most recent call last):
  File "/home/soft/SCAPTURE-main/DeepPASS/Predict.py", line 75, in <module>
    PredictSet = convert2tensor(dataset)
  File "/home/soft/SCAPTURE-main/DeepPASS/Predict.py", line 44, in convert2tensor
    seq = tf.convert_to_tensor(data["seq"].apply(lambda x:np.array([ NT_dict[i] for i in x],dtype=np.float32)))
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py", line 201, in wrapper
    return target(*args, **kwargs)
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1405, in convert_to_tensor_v2_with_dispatch
    value, dtype=dtype, dtype_hint=dtype_hint, name=name)
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1415, in convert_to_tensor_v2
    as_ref=False)
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/profiler/trace.py", line 163, in wrapped
    return func(*args, **kwargs)
File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1540, in convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 339, in _constant_tensor_conversion_function
    return constant(v, dtype=dtype, name=name)
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 265, in constant
    allow_broadcast=True)
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 276, in _constant_impl
    return _constant_eager_impl(ctx, value, dtype, shape, verify_shape)
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 301, in _constant_eager_impl
    t = convert_to_eager_tensor(value, ctx, dtype)
  File "/home/soft/miniconda3/envs/SCAPTURE_env/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 98, in convert_to_eager_tensor
    return ops.EagerTensor(value, ctx.device_name, dtype)
ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray).

I can't figure it out, any guidance is grateful!

@liguowei-CAS
Copy link
Contributor

liguowei-CAS commented Sep 16, 2021

Hi,

The error maybe caused by unmatched version between tensorflow and numpy (we used tensorflow-gpu==2.0.0 and numpy==1.17.0), or unrecognized input file format, etc.

  1. Please activate SCAPTURE_env and send us ([email protected]) the output of command: conda list
  2. Otherwise, you could offer us some subset files in previous step of SCAPTURE.

@binghongw
Copy link
Author

binghongw commented Sep 17, 2021

Hi,

The error maybe caused by unmatched version between tensorflow and numpy (we used tensorflow-gpu==2.0.0 and numpy==1.17.0), or unrecognized input file format, etc.

  1. Please activate SCAPTURE_env and send us ([email protected]) the output of command: conda list
  2. Otherwise, you could offer us some subset files in previous step of SCAPTURE.

Hi,
thanks for your reply, I have sent the files to you

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