Skip to content

Error: No motifs provided #58

Open

Description

@letaibui27-star

Hello,

I am trying to use the create_cistarget_motif_databases.py script to build a database for Arabidopsis thaliana, but I am consistently getting an Error: No motifs provided. even on a minimal test case where all inputs have been verified.

Here is my setup and what I have tried:

  1. Environment:
  • I have a conda environment and it is activated.
  • The cbust program was compiled manually and is in my $PATH. A direct manual call to cbust on a single motif file and the fasta file works correctly and produces scores.
  1. Inputs (Minimal Test Case):
    I created a small FASTA file: promoters_test.fasta.
    I have a directory of motif files in the required raw matrix format: motifs_cb_format/.
    I created a list with a single, existing motif file name: single_motif_test.list.
    The content of single_motif_test.list is just one line: MA0001.1.cb
    The file motifs_cb_format/MA0001.1.cb definitely exists.

  2. Command:
    I am running the following command with absolute paths:
    python /path/to/create_cistarget_motif_databases.py
    -f /path/to/promoters_test.fasta
    -M /path/to/motifs_cb_format
    -m /path/to/single_motif_test.list
    -o /path/to/my_athaliana_db_singletest
    -t 8

  3. The Error:
    Despite all inputs being correct and cbust working manually, the script immediately fails with:
    Error: No motifs provided.

This suggests the script is failing to read or process the motif list file (-m) correctly in my specific environment, before it even attempts to call cbust. Could you please provide any insights into what might be causing this pre-flight check to fail?
Thank you for your help.

Best wishes
Bui

Activity

  1. ghuls commented on Oct 10, 2025

    @ghuls
    Member

    What is the output of:

    file /path/to/single_motif_test.list
  2. letaibui27-star commented on Oct 10, 2025

    @letaibui27-star
    Author

    What is the output of:

    file /path/to/single_motif_test.list

    Dear @ghuls
    This is the output
    /home/ug1737/motif/motifs.list: ASCII text
    Thanks

  3. ghuls commented on Oct 15, 2025

    @ghuls
    Member

    Could you share your input file in a zip file?
    I don't see anything directly that could be wrong.

  4. letaibui27-star commented on Oct 29, 2025

    @letaibui27-star
    Author

    Could you share your input file in a zip file? I don't see anything directly that could be wrong.

    Dear @ghuls
    Sorry for the late reply. Here is the zip file with my inputs. Thanks a lot for your help!
    bui_athaliana_db.zip

  5. ghuls commented on Nov 12, 2025

    @ghuls
    Member

    @letaibui27-star Sorry for the delay.

    Your motifs are not in Cluster-Buster format.

    22      16      25      27      0       0       82      40      56      35      65      25      64      0       33      52      45      21
    29      9       8       16      92      79      1       4       0       0       1       4       0       0       14      5       23      24
    34      29      4       13      0       0       2       3       1       0       4       3       28      92      15      7       13      26
    10      41      58      39      3       16      10      48      38      60      25      63      3       3       33      31      14      24
    

    Cluster-Buster format looks like the following:

    • Motif name: >motif_name
    • counts for A, C, G and T on one row (with one row per position in the matrix.
    >MA2042.1
    22      29      34      10
    16      9       29      41
    25      8       4       58
    27      16      13      39
    0       92      0       3
    0       79      0       16
    82      1       2       10
    40      4       3       48
    56      0       1       38
    35      0       0       60
    65      1       4       25
    25      4       3       63
    64      0       28      3
    0       0       92      3
    33      14      15      33
    52      5       7       31
    45      23      13      14
    21      24      26      24
    

    With BioPython you can convert between motif formats:

    import glob
    from pathlib import Path
    
    import Bio.motifs
    
    
    def convert_jaspar_pfm_to_cluster_buster(jaspar_motif_filename, cluster_buster_motif_filename):
        with open(jaspar_motif_filename, "r") as jaspar_motif_fh:
            # Read JAPSAR motif.
            motif = Bio.motifs.read(jaspar_motif_fh, "pfm-four-rows")
            # Add motif name to motif object.
            motif.name = Path(motif_from_R).stem
    
            with open(cluster_buster_motif_filename, "w") as cluster_buster_motif_fh:
                print(Bio.motifs.write([motif], "clusterbuster"), file=cluster_buster_motif_fh)
    
    
    for jaspar_motif_filename in glob.glob("motifs_cb_from_R/*.cb"):
        cluster_buster_filename = jaspar_motif_filename.replace(
            "motifs_cb_from_R", "motifs_cb"
        )
        print(jaspar_motif_filename, cluster_buster_filename)
        convert_jaspar_pfm_to_cluster_buster(jaspar_motif_filename, cluster_buster_filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions