Skip to content

Commit

Permalink
Some docs, simple test for FASTA loading
Browse files Browse the repository at this point in the history
  • Loading branch information
SamStudio8 committed Aug 7, 2015
1 parent 20c18e9 commit df17caf
Show file tree
Hide file tree
Showing 9 changed files with 242 additions and 232 deletions.
6 changes: 3 additions & 3 deletions docs/advanced.rst
@@ -1,6 +1,6 @@
==============
Advanced Usage
==============
======================
Advanced Package Usage
======================

The following assumes basic Python programming experience (and
that you have installed Goldilocks and familiarised yourself
Expand Down
224 changes: 0 additions & 224 deletions docs/examples.rst

This file was deleted.

3 changes: 2 additions & 1 deletion docs/index.rst
Expand Up @@ -13,7 +13,8 @@ Contents:

readme
installation
examples
cli
basic
advanced
exporting
plotting
Expand Down
5 changes: 1 addition & 4 deletions goldilocks/goldilocks.py
Expand Up @@ -193,14 +193,14 @@ def __init__(self, strategy, data, length, stride, is_pos=False, is_faidx=False,
# Read data
self.groups = data
self.max_chr_max_len = None
self.fa_idx = {}

for group in self.groups:
if self.IS_FAI:
self.groups[group]["seq"] = {}
#TODO Close f
#TODO Assume for now records in each input faidx are ordered zipwise
for i, line in enumerate(open(self.groups[group]["idx"])):
i += 1
self.groups[group]["seq"][i] = {}
fields = line.strip().split("\t")

Expand Down Expand Up @@ -297,7 +297,6 @@ def census_slide(work_q):

i = work_block["i"]
zeropos_start = work_block["s0"]
#onepos_end = work_block["e1"]
track = work_block["t"]
track_id = work_block["tid"]
group = work_block["g"]
Expand Down Expand Up @@ -362,7 +361,6 @@ def census_slide(work_q):
wwork_block = {
"i": region_i,
"s0": zeropos_start,
#"e1": onepos_end,
"t": track,
"tid": track_id,
"g": group,
Expand All @@ -378,7 +376,6 @@ def census_slide(work_q):
for _ in range(self.PROCESSES):
p = Process(target=census_slide,
args=(work_queue,))
#p.daemon = True
processes.append(p)

for p in processes:
Expand Down
4 changes: 4 additions & 0 deletions tests/dat/my_other_sequence.fa
@@ -0,0 +1,4 @@
>hoothoot
AAACCCNNNTTTAAACCCGGGNNNAAACCCGGGTTTNNNCCCGGGTTT
>meowmeow
GCGTNANNGANGGCTANTCTANAGCNNTTTCTNTNNGCANCANTTGNN
2 changes: 2 additions & 0 deletions tests/dat/my_other_sequence.fa.fai
@@ -0,0 +1,2 @@
hoothoot 48 10 48 49
meowmeow 48 69 48 49
4 changes: 4 additions & 0 deletions tests/dat/my_sequence.fa
@@ -0,0 +1,4 @@
>hoothoot
AAACCCNNNTTTAAACCCGGGNNNAAACCCGGGTTTNNNCCCGGGTTT
>meowmeow
GCGTNANNGANGGCTANTCTANAGCNNTTTCTNTNNGCANCANTTGNN
2 changes: 2 additions & 0 deletions tests/dat/my_sequence.fa.fai
@@ -0,0 +1,2 @@
hoothoot 48 10 48 49
meowmeow 48 69 48 49

0 comments on commit df17caf

Please sign in to comment.