2015-04-20 8:59 GMT+02:00 BenedettaB24 . <benedetta.brune...@gmail.com>:
> Salve, > Ciao Benedetta > sto studiando genomica e vorrei usare il pacchetto PyBedtools per lavorare > sui miei dati visto che PyBedtools può essere lanciato contro file con > diverse estensioni. > Questo è quello che ho messo prendendo il format trovato in alcune pagine > internet. > Ma non riesco a capire come farlo funzionare perchè non mi da un errore ma > si blocca subito, quando la mia analisi dovrebbe durare almeno 2 giorni di > processamento. > uso il seguente script: > > #!usr/bin/python > > from pybedtools import BedTool > > snps = BedTool('allSNAP_hg19.bed') > genes = BedTool('chr1-y.tar.gz') > > intergenic_snps = snps.intersect(genes) > nearby = genes.closest(intergenic_snps, d=True, stream=True) > > for gene in nearby: > if int(gene[-1]) < 1000: > print gene.name > > l'errore che mi da è: > Error message was: > It looks as though you have less than 3 columns at line: 1. Are you sure > your files are tab-delimited?ù > premetto che non ho mai usato PyBedtools, pero l'errore indica che almeno uno dei files che leggi ('allSNAP_hg19.bed' e 'chr1-y.tar.gz'') non e' in formato bed con 3 colonne. Sei sicura che il file con i chromosomi sia in bed? E soprattutto, sei sicura che si possa leggere con BedTool un file compresso? Ciao, Loris
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python