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

ValueError: could not convert string to float #40

Open
SL1993 opened this issue Jul 21, 2022 · 1 comment
Open

ValueError: could not convert string to float #40

SL1993 opened this issue Jul 21, 2022 · 1 comment

Comments

@SL1993
Copy link

SL1993 commented Jul 21, 2022

Hi,
I tried SJARACNe(v. 0.2.1) with my own expression matrix prepared by Network reconstruction pipeline from NetBID2. Everything looked fine until it threw this error in Create an enhanced consensus network part:

File "/home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/bin/create_consensus_network.py", line 209, in create_enhanced_consensus_network
exp_values2 = exp_symbol_values2[1:].astype(float)
ValueError: could not convert string to float: 'RPL10'

In which 'RPL10' is a genesymbol.

The error resulted in a truncated consensus_network_ncol_.txt file, which apparently contained only part of network data.

Code and ouput is listed below.

sjaracne local -e ./test/input/input.exp -g ./test/input/tf.txt -n 2 -o ./test/output/SJARACNE_tf_out.final -pc 1.0

INFO:root:test/output/SJARACNE_tf_out.final/sjaracne_workflow.yml
INFO:root:exp_file:
class: File
path: /home/user01/work/TF/test/input/input.exp
probe_file:
class: File
path: /home/user01/work/TF/test/input/tf.txt
p_value_consensus: 1.0
p_value_bootstrap: 1e-07
depth: 40
aracne_config_dir:
class: Directory
path: /home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/config
bootstrap_num: 2
final_out_dir_name: SJARACNE_tf_out.final3
INFO:root:cwltool --parallel --outdir ./test/output/SJARACNE_tf_out.final /home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/cwl/sjaracne_workflow.cwl test/output/SJARACNE_tf_out.final/sjaracne_workflow.yml
INFO /home/user01/.conda/envs/py376/bin/cwltool 3.1.20220628170238
INFO Resolved '/home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/cwl/sjaracne_workflow.cwl' to 'file:///home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/cwl/sjaracne_workflow.cwl'
INFO [workflow ] starting step validate_files
INFO [workflow ] start
INFO [step validate_files] start
INFO [workflow ] starting step ch_ending_exp
INFO [step ch_ending_exp] start
INFO [workflow ] starting step create_adjmat_names
INFO [step create_adjmat_names] start
INFO [workflow ] starting step ch_ending_probe
INFO [step ch_ending_probe] start
INFO [workflow ] starting step create_seeds
INFO [step create_seeds] start
INFO [job validate_files] /tmp/t70am_xd$ QC_input.py
-e
input.exp
-g
tf.txt
INFO [job ch_ending_exp] /tmp/duo1yet9$ ch_line_ending.py
-i
input.exp
INFO [job ch_ending_probe] /tmp/gvzv619s$ ch_line_ending.py
-i
tf.txt
Unix line ending. No need to convert
Unix line ending. No need to convert
INFO [step create_seeds] completed success
INFO [step create_adjmat_names] completed success
INFO [job ch_ending_probe] completed success
INFO [step ch_ending_probe] completed success
INFO [job ch_ending_exp] completed success
INFO [step ch_ending_exp] completed success
INFO [workflow ] starting step bootstrap
INFO [step bootstrap] start
INFO [step bootstrap] start
INFO [job bootstrap] /tmp/omfn6w8x$ sjaracne.exe
-i
/tmp/znbymlqn/stg839d274f-f440-4d80-9760-ff7437272384/input.exp
-l
/tmp/znbymlqn/stgdd1763b7-4abb-4450-ac9e-d52f3785d9c1/tf.txt
-s
/tmp/znbymlqn/stgdd1763b7-4abb-4450-ac9e-d52f3785d9c1/tf.txt
-p
1e-07
-e
0
-a
adaptive_partitioning
-r
1
-H
/tmp/znbymlqn/stg167fb5f1-5fe6-44e0-a222-28f89c4905db/config
-N
40
-o
TF_run_001.adj
-S
1
INFO [job bootstrap_2] /tmp/4pzzy3tu$ sjaracne.exe
-i
/tmp/dhfpex2z/stg36ff59ea-6b99-4a8b-9dce-312ee18d8abe/input.exp
-l
/tmp/dhfpex2z/stg291b2ea6-7b1e-4b82-aef9-3cc80d86b4ae/tf.txt
-s
/tmp/dhfpex2z/stg291b2ea6-7b1e-4b82-aef9-3cc80d86b4ae/tf.txt
-p
1e-07
-e
0
-a
adaptive_partitioning
-r
1
-H
/tmp/dhfpex2z/stgcf32d1a8-ebd0-4275-9d53-89b75752c169/config
-N
40
-o
TF_run_002.adj
-S
2
Displaying parameters

[PARA] Input file: /tmp/znbymlqn/stg839d274f-f440-4d80-9760-ff7437272384/input.exp
[PARA] Output file: TF_run_001.adj
[PARA] MI P-value: 1e-07
[PARA] DPI tolerance: 0
[PARA] Subset of probes to reconstruct: /tmp/znbymlqn/stgdd1763b7-4abb-4450-ac9e-d52f3785d9c1/tf.txt (1904)
[PARA] TF annotation list: /tmp/znbymlqn/stgdd1763b7-4abb-4450-ac9e-d52f3785d9c1/tf.txt (1904)
[PARA] Npar limit: 40

[READ] 0 Description lines bypassed.
[READ] P-value columns not found.
Displaying parameters

[PARA] Input file: /tmp/dhfpex2z/stg36ff59ea-6b99-4a8b-9dce-312ee18d8abe/input.exp
[PARA] Output file: TF_run_002.adj
[PARA] MI P-value: 1e-07
[PARA] DPI tolerance: 0
[PARA] Subset of probes to reconstruct: /tmp/dhfpex2z/stg291b2ea6-7b1e-4b82-aef9-3cc80d86b4ae/tf.txt (1904)
[PARA] TF annotation list: /tmp/dhfpex2z/stg291b2ea6-7b1e-4b82-aef9-3cc80d86b4ae/tf.txt (1904)
[PARA] Npar limit: 40

[READ] 0 Description lines bypassed.
[READ] P-value columns not found.
INFO:root:Number of genes in expression matrix: 17870
INFO:root:Number of hub genes in probe file: 1904
INFO [job validate_files] Max memory used: 10MiB
INFO [job validate_files] completed success
INFO [step validate_files] completed success
Marker No: 17870 (17870 active), Array No: 504
MI threshold determined for p=1e-07: 0.0466551
Marker No: 17870 (17870 active), Array No: 504
MI threshold determined for p=1e-07: 0.0466551
10%, time: 269
10%, time: 271
20%, time: 536
20%, time: 541
30%, time: 802
30%, time: 810
40%, time: 1070
40%, time: 1079
50%, time: 1338
50%, time: 1350
60%, time: 1607
60%, time: 1620
70%, time: 1878
70%, time: 1894
80%, time: 2149
80%, time: 2167
90%, time: 2419
90%, time: 2440
Gene: 1904 Time: 2681
[NETWORK] Applying DPI ...
Gene: 1904 Time: 2703
[NETWORK] Applying DPI ...
DPI running time is: 65
Writing matrix: TF_run_001.adj
Maximum observed npar: 6
INFO [job bootstrap] Max memory used: 56MiB
INFO [job bootstrap] completed success
DPI running time is: 70
Writing matrix: TF_run_002.adj
Maximum observed npar: 7
INFO [job bootstrap_2] Max memory used: 55MiB
INFO [job bootstrap_2] completed success
INFO [step bootstrap] completed success
INFO [workflow ] starting step copy_to_dir
INFO [step copy_to_dir] start
INFO [step copy_to_dir] completed success
INFO [workflow ] starting step consensus
INFO [step consensus] start
INFO [job consensus] /tmp/zumrko8m$ create_consensus_network.py
-a
/tmp/e77t3_ny/stg4146412a-620d-464f-a257-850774127920/SJARACNE_tf_out.final
-p
1.0
-e
/tmp/e77t3_ny/stgda616f26-f6ff-4324-a681-aef2f1a329f3/input.exp
-o
SJARACNE_tf_out.final
INFO:root:Create an initial consensus network ...
INFO:root:Done
INFO:root:Create an enhanced consensus network ...
Traceback (most recent call last):
File "/home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/bin/create_consensus_network.py", line 251, in
main()
File "/home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/bin/create_consensus_network.py", line 35, in main
create_enhanced_consensus_network(args.exp_mat, network, args.out_dir, args.subnet)
File "/home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/bin/create_consensus_network.py", line 209, in create_enhanced_consensus_network
exp_values2 = exp_symbol_values2[1:].astype(float)
ValueError: could not convert string to float: 'RPL10'
INFO [job consensus] Max memory used: 150MiB
WARNING [job consensus] exited with status: 1
WARNING [job consensus] completed permanentFail
WARNING [step consensus] completed permanentFail
INFO [workflow ] completed permanentFail
{
"out_dir": {
"location": "file:///home/user01/work/TF/test/output/SJARACNE_tf_out.final/consensus_network_ncol_.txt",
"basename": "consensus_network_ncol_.txt",
"class": "File",
"checksum": "sha1$0d567f2e690e217b4aaf4095dfb7bdd2dac934c4",
"size": 12339,
"path": "/home/user01/work/TF/test/output/SJARACNE_tf_out.final/consensus_network_ncol_.txt"
}
}
WARNING Final process status is permanentFail
Traceback (most recent call last):
File "/home/user01/.conda/envs/py376/bin/sjaracne", line 33, in
sys.exit(load_entry_point('SJARACNe==0.2.1', 'console_scripts', 'sjaracne')())
File "/home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/sjaracne.py", line 99, in main
run_shell_command_call(cmd)
File "/home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/sjaracne.py", line 110, in run_shell_command_call
subprocess.check_call(cmd_to_exec)
File "/home/user01/.conda/envs/py376/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cwltool', '--parallel', '--outdir', './test/output/SJARACNE_tf_out.final', '/home/user01/.conda/envs/py376/lib/python3.7/site-packages/SJARACNe-0.2.1-py3.7.egg/SJARACNe/cwl/sjaracne_workflow.cwl', 'test/output/SJARACNE_tf_out.final/sjaracne_workflow.yml']' returned non-zero exit status 1.

After checking Input.exp file, i found SJARACNe recognized another gene , "MRPL10"(a mitochondrial ribosomal protein), as an isoform of "RPL10", which it isn't, and tranformed isoformId "MRPL10" to "RPL10", leaving duplicated isoformIds.

Is there any solution for this error?

BTW, is it necessary to set a random seed for a reproducible result, how to set it in linux command line?

Thanks.

@karlie002
Copy link

Hi ! I just met the same error message as you posted ' [READ] P-value columns not found. ' . Does this message matters when running sjaracne local ??

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