RNAseq sample upload bug

Hi, I’m having some trouble with RNA-seq data upload. I’m uploading it from HPC Create at KCL, but get this error after first sample upload:

Traceback (most recent call last):
  File "/rds/prj/ppn_comp_analysis_rnp/users/luka.gnidovec/20241216_Flpin_3seq/flow_upload_3seq-DemuxSamples.py", line 24, in <module>
    sampleFlow = client.upload_sample(
  File "/users/k2371247/.local/lib/python3.9/site-packages/flowbio/upload.py", line 102, in upload_sample
    return self.sample(sample_id)
  File "/users/k2371247/.local/lib/python3.9/site-packages/flowbio/samples.py", line 13, in sample
    return self.execute(SAMPLE, variables={"id": id})["data"]["sample"]
  File "/users/k2371247/.local/lib/python3.9/site-packages/flowbio/client.py", line 27, in execute
    raise GraphQlError(resp["errors"])
flowbio.client.GraphQlError: [{'message': 'Cannot query field "type" on type "SampleType".', 'locations': [{'line': 3, 'column': 33}]}]

It does seem to upload the first sample’s read 1 to flow, but then it terminates.
In my upload code, I do specify the category as RNA-Seq. But on flow, the type of the uploaded read 1 is not set. Not sure if this is relevant or not.
Thanks in advance!
Luka

Hi Luka - could you try upgrading your flowbio python library with:

pip install --upgrade flowbio

There was a recent update to the library - the most recent version is 0.3.3.

Hello!, I’ve been getting a similar error when I try uploading samples too:

(flowupload) k2258586@erc-hpc-login1:/scratch/prj/ppn_rnp_networks/users/gwyd.james/OGJ_52_tdpkd$ python script4.py

Uploading sample 'E52_1wk1'
  R1 → /cephfs/volumes/hpc_data_prj/ppn_rnp_networks/e7b1e091-6dae-4f7a-abad-2b1093052fb3/users/gwyd.james/OGJ_52_tdpkd/fastqFlowUpload/E52_1wk1_1.fq.gz
  R2 → /cephfs/volumes/hpc_data_prj/ppn_rnp_networks/e7b1e091-6dae-4f7a-abad-2b1093052fb3/users/gwyd.james/OGJ_52_tdpkd/fastqFlowUpload/E52_1wk1_2.fq.gz
Uploading E52_1wk1_1.fq.gz: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 1550/1550 [05:48<00:00,  4.45it/s]
Uploading E52_1wk1_2.fq.gz: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 1634/1634 [05:35<00:00,  4.87it/s]
Traceback (most recent call last):
  File "/cephfs/volumes/hpc_data_prj/ppn_rnp_networks/e7b1e091-6dae-4f7a-abad-2b1093052fb3/users/gwyd.james/OGJ_52_tdpkd/script4.py", line 24, in <module>
    sample_obj = client.upload_sample(
        sample,
    ...<12 lines>...
        }
    )
  File "/users/k2258586/.conda/envs/flowupload/lib/python3.13/site-packages/flowbio/upload.py", line 102, in upload_sample
    return self.sample(sample_id)
           ~~~~~~~~~~~^^^^^^^^^^^
  File "/users/k2258586/.conda/envs/flowupload/lib/python3.13/site-packages/flowbio/samples.py", line 13, in sample
    return self.execute(SAMPLE, variables={"id": id})["data"]["sample"]
           ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/users/k2258586/.conda/envs/flowupload/lib/python3.13/site-packages/flowbio/client.py", line 27, in execute
    raise GraphQlError(resp["errors"])
flowbio.client.GraphQlError: [{'message': "Cannot query field 'type' on type 'SampleType'.", 'locations': [{'line': 3, 'column': 33}]}]

I’m using flowbio 0.3.3 and the api settings from: https://docs.api.flow.bio/

Cheers!

Gwyd

Hi Gwyd - apologies, looks like a recent API change introduced a slight mismatch in the attribute names that the flowbio library expects. I’ve just pushed a small patch version, 0.3.4, which should hopefully resolve this. If you run pip install --upgrade flowbio it should pull in the new version.

1 Like

Thanks Sam, that works now!

Only thing is that the sampleType metadata key is not being recognised. I’ve tried category type and sampleType but I always get:

'sampleType': None

I can amend the metadata once the samples are uploaded to make them available for analysis but thought I’d mention it here.

Cheers