Teichlab / tracer

TraCeR - reconstruction of T cell receptor sequences from single-cell RNAseq data
Other
124 stars 48 forks source link

Tracer summarise returning KeyError #39

Closed mn120110d closed 7 years ago

mn120110d commented 7 years ago

Hi Mike,

We were testing tracer summarise version 0.5.0 with the results that you provided in tracer/test_data/results/. This directory contained only folders cell2 and cell3. We got a KeyError: 'cell_name', which was returned by pandas.merge() function on the following line in tracerlib/tasks.py:

cell_data = pd.merge(recombinant_data, group_membership, how='outer', on='cell_name').

As we inspected the code, we suppose that the problem happened because of the content of the following files:

tracer/test_data/results/cell3/filtered_TCR_seqs/cell3_TCRseqs.fa tracer/test_data/results/cell2/filtered_TCR_seqs/cell2_TCRseqs.fa

There is no relation between names of the sequences in those files, so pandas.merge() is trying to merge two dataFrames, where one of them is empty (group_membership).

We provide the file with the content of an error that we got: Error when running command tracer summarise tracer:test_data:results:.txt

We think that it would be better if the program generated a message when this kind of a problem happens instead of throwing an error and interrupting further execution.

Thanks in advance! Tamara and Nevena

mstubb commented 7 years ago

Hi,

Please could you let me know the command that you ran that led this error. I just tried to replicate it by running tracer summarise . whilst in tracer/test_data/results and it executed fine.

Please also send me the config file that you're using. From the logs it looks like you are using tracer.conf from within the tracer directory. Have you edited it to include appropriate paths etc?

Thanks a lot,

Mike

mn120110d commented 7 years ago

Hi Mike,

Thank you for your answer. We tried with the newest version of Tracer and everything worked fine. The command we ran was tracer summarise tracer/test_data/results. We didn't change tracer.conf a lot, instead we exported paths to the tools that tracer is using, but here is our tracer.conf file: tracer.conf.txt

We also have a question about files that can be used to run tracer assemble. Is it possible to use fastq files that are generated from some other single cell protocols, not only from Fluidigm C1, and get correct results?

Thank you very much!

mstubb commented 7 years ago

Hi, apologies for the delay in answering this. Glad it's now working for you.

You can use TraCeR with any scRNAseq protocols that sequence the entire length of the mRNAs. So, it won't work with the droplet-based methods that sequence tags at the 3' ends but it will work with SmartSeq2 in microwell plates.