pinellolab/dictys

Dynamic inference errors using custom subsets

Closed this issue · 8 comments

Hi @lingfeiwang. I'm running into an issue with the dynamic inference on my own dataset that I believe is related to the subsets being created in tmp_dynamic. I have created the prerequisite files as outlined in https://github.com/pinellolab/dictys/blob/master/doc/tutorials/full-skin/notebooks/main2.ipynb. However, I noticed that the subsets being generated in tmp_dynamic differ from the custom ones that I created earlier on. I figure I might be able to bypass this issue by creating my own tmp_dynamic folder with my own subsets.txt, subset_locs.h5, and subset_edges.tsv.gz. Could you please advise on how to do so? If the errors stem from a separate issue, any help would be much appreciated.

I ran:

dictys_helper network_inference.sh -j 16 -J 1 dynamic 

The output was quite long, so I've attached it as a separate file
slurm-23089385.txt
.

Hi nikithkurella,

I can see several types of errors in your output.

  • [bam_sort_core] failed to create temporary file "/project/macleana_13/kurellan/Dictys/yAL/tmp_dynamic/Subset3/reads.bam.tmp.0003.bam": File exists
    You probably ran the steps multiple times and didn't clean the temporary files inbetween. Whenever you fail the dictys_helper network_inference.sh ... step, you should delete the tmp_dynamic folder or simply recreate the folder structure in a new location.

  • index: invalid option -- '@'
    This indicates you are using the wrong samtools version. Probably you didn't install Dictys properly. Please make sure you ran the tutorials successfully first.

I don't see anything wrong with the subset creation. Note that you didn't create the subsets but only the trajectory as input. Subsets are determined automatically from the trajectory.

Lingfei

Thank you for your response @lingfeiwang. I ran the full-skin tutorial with a fresh conda environment prepared with the instructions outlined in the documentation. However, I am still running into the index: invalid option -- '@' issue for the tutorial. The environment is currently using samtools 1.3.1 from bioconda. Is this the correct version I should be using?

Hi nikithkurella,

You should check your conda and PATH settings. It should install samtools ~1.20. See https://github.com/pinellolab/dictys/actions/runs/8803877738/job/24163840030#step:5:582 .

Hi @nikithkurella,

We have updated Dictys so it can work with older versions of samtools. You can find the details at the bottom of FAQ. You also need to update Dictys to the latest version. Please let us know if that doesn't work for you.

Lingfei

Hi, @lingfeiwang. I'm doing the dynamic inference on my own merged two datasets. The code is 'dictys_helper network_inference.sh -j 8 -J 1 dynamic'. Is there any problem?

"Traceback (most recent call last):
File "/share/home/wangxinxin/miniconda3/envs/dictys/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/share/home/wangxinxin/miniconda3/envs/dictys/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/share/home/wangxinxin/miniconda3/envs/dictys/lib/python3.9/site-packages/dictys/main.py", line 13, in
docstringrunner(package)
File "/share/home/wangxinxin/miniconda3/envs/dictys/lib/python3.9/site-packages/docstring2argparse/init.py", line 340, in docstringrunner
run_args(pkgname,funcs,args)
File "/share/home/wangxinxin/miniconda3/envs/dictys/lib/python3.9/site-packages/docstring2argparse/init.py", line 330, in run_args
return func(*a,**ka)
File "/share/home/wangxinxin/miniconda3/envs/dictys/lib/python3.9/site-packages/dictys/network.py", line 1074, in tofile
n=network.from_folders(diri_data,diri_work,fi_subsets,dynamic=dynamic,nettype=nettype,optional=optional,fi_c=fi_c)
File "/share/home/wangxinxin/miniconda3/envs/dictys/lib/python3.9/site-packages/dictys/net/init.py", line 457, in from_folders
ncprop['readcount']=readcount.values.astype(dtype_min(readcount.values.astype(int)))
File "/share/home/wangxinxin/miniconda3/envs/dictys/lib/python3.9/site-packages/dictys/utils/numpy.py", line 99, in dtype_min
t1=np.iinfo(np.dtype(f'{typebase}{itemsize_new}'))
TypeError: data type 'i0' not understood"

Hi wangqiuba2024,

Have you run all the tutorials successfully? If not, please post a standard tutorial issue first.

Lingfei

Thank you for your reply @lingfeiwang. there are no problems with the tutorial. Is it a problem with the two data I merged or a problem with the trajectory file? The same data for static analysis did well!

Hi wangqiuba2024,

The error seems to suggest you don't have nonzero values in your input scRNA-seq read count matrix. Can you check if your trajectory contains any cell or any cell subset in scRNA-seq?