Commit ef5442a6 authored by peguerin's avatar peguerin
Browse files

add doc

parent 2c8fb4a0
###############################################################################
# usage
## python3 scripts/prepare_spygen_data.py --datFolder resources/tutorial/tutorial_rapidrun_data/ngs/testmaleplofakarava/rapidrun_metadata/ \
## --aliceFile ********
## --projetName notrProjet
###############################################################################
# notice
## aliceFile is parsed to seek marker, run and projet name
##
## datFolder contains .dat files the name of these .dat files must
## match marker name into aliceFile (it is not case sensitive)
## for instance marker "mamm" must have the corresponding file Mamm.dat or
## mamm.dat
##
## From aliceFile marker, run and projet, the program seek into corresponding
## marker .dat file the column tag to get the plaque position
##
## At the end the program print a CSV ;-separated table with header
## "projet;marker;run;plaque;sample"
## which will be required for demultiplexing step
###############################################################################
###############################################################################
# modules
import pandas
import sys
import argparse
import os
###############################################################################
# arguments
parser = argparse.ArgumentParser(description='prepare rapidrun allsamples CSV file')
parser.add_argument("-d","--datFolder", type=str, help="Folder of the dat files")
......@@ -29,14 +56,12 @@ datDic = {}
for key in datFiles:
datDic[key] = pandas.read_csv(datFiles[key], sep='\t', names=["plaque", "plaque1", "tag", "primerF","primerR", "description"])
###############################################################################
alice = pandas.read_csv(aliceFile, sep=';')
#dat = pandas.read_csv(datFile, sep='\t', names=["plaque", "plaque1", "tag", "primerF","primerR", "description"])
uniqMarkers=alice.marker.unique()
###############################################################################
# main
uniqMarkers=alice.marker.unique()
for marker in uniqMarkers:
#print(marker)
aliceMarker = alice.loc[(alice['marker'] == marker)]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment