-
Notifications
You must be signed in to change notification settings - Fork 3
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
transform_bc.py missing? #1
Comments
Hello, I'll add the file in when I get the chance tomorrow. But here is a quick copy/paste with my phone that should work.
|
Many thanks James, I will try it
best
Andres
…On Mon, 21 Jun 2021 at 11:17, James Ferguson ***@***.***> wrote:
Hello,
I'll add the file in when I get the chance tomorrow. But here is a quick
copy/paste with my phone that should work.
import sys
filename = sys.argv[1]
header = int(sys.argv[2])
head = False
if header:
head = True
count = 0
# first = '\t'.join(['index', 'fwd_bc', 'rev_bc', 'gene_num', 'UMI_num'])
first = '\t'.join(['index', 'fwd_bc', 'rev_bc'])
print first
with open(filename, 'r') as f:
for l in f:
if head:
head = False
continue
count += 1
l = l.strip('\r\n')
l = l.strip('\r')
l = l.strip('\n')
l = l.split(',')
l = [i.strip('"') for i in l]
l[0] = l[0].split('-')[0]
rev = []
for i in l[0]:
if i == 'A':
rev.append('T')
elif i == 'T':
rev.append('A')
elif i == 'G':
rev.append('C')
elif i == 'C':
rev.append('G')
else:
print >> sys.stderr, "Something is wrong, try again", l
out = ''.join(rev[::-1])
# print '\t'.join([str(count), l[0], out, l[1], l[2]])
print '\t'.join([str(count), l[0], out])
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIVOOMRFF3MCBKB5QFJAHFLTT4GSJANCNFSM47BIPXTA>
.
--
*Aviso legal:* El contenido de este mensaje y los archivos adjuntos son
confidenciales y de uso exclusivo de la Universidad Nacional de Colombia.
Se encuentran dirigidos sólo para el uso del destinatario al cual van
enviados. La reproducción, lectura y/o copia se encuentran prohibidas a
cualquier persona diferente a este y puede ser ilegal. Si usted lo ha
recibido por error, infórmenos y elimínelo de su correo. Los Datos
Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra
Política de Datos Personales que podrá consultar en la página web
www.unal.edu.co <http://www.unal.edu.co/>.* *Las opiniones, informaciones,
conclusiones y cualquier otro tipo de dato contenido en este correo
electrónico, no relacionados con la actividad de la Universidad Nacional de
Colombia, se entenderá como personales y de ninguna manera son avaladas por
la Universidad.
|
What should be the input for this? The Barcodes from cellranger? |
Hello, This was built to accommodate the ever changing and bug ridden formats I was given from the illumina/cell ranger side of things. But I'll upload a simplified version now, that takes a flat list of barcodes, for example, the input file would look like this:
And the output would be in the format needed for the demultiplexing. James F. |
Alright, so if you have barcodes that look like this in a file
then you do
Then you can use this file for the demultiplexing. |
Hi, Thank you very much for this amzing work, I was trying to use your pipeline, however seem like the transform_bc.py file is mising from the repository. Could you please let me know how can i get tha file? or how to format the BC for the input
best
Andres
The text was updated successfully, but these errors were encountered: