Skip to content

Commit

Permalink
Update v0.10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryuichiro Nakato committed Dec 27, 2023
1 parent a24f9de commit 66846e2
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.11"
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
Expand All @@ -24,12 +24,12 @@ sphinx:

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
python:
install:
- requirements: docs/requirements.txt
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.10.6 (2023-12-26)
- Added warning messages in `churros` when there are the same raws in `samplelist.txt`.

## 0.10.5 (2023-12-21)
- Bug fix in `gen_samplelist.sh`

Expand Down
39 changes: 38 additions & 1 deletion Dockerfiles/Churros/churros
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import argparse
import pathlib
import pandas as pd

__version__ = '0.10.4'
__version__ = '0.10.6'

def print_and_exec_shell(command):
print (command)
Expand All @@ -27,6 +27,38 @@ def check_dir(dir):
print ("Error: " + dir + " does not exist.")
exit()

def check_fastq_in_samplelist(samplelist):
df = pd.read_csv(samplelist, sep="\t", header=None)
df.fillna("", inplace=True)
for index, row in df.iterrows():
if (len(row)<2 or row[1] == ""):
print ("Error: specify fastq file in " + samplelist + ".")
exit()

fq1 = row[1]
for fastq in fq1.split(","):
check_file(fastq)

if (len(row)>2): # for paired-end
fq2 = row[2]
for fastq in fq2.split(","):
check_file(fastq)

def check_duplicates(file_path):
df = pd.read_csv(file_path, sep='\t', header=None, names=['Col1', 'Col2'])

duplicates_col1 = df['Col1'].duplicated(keep=False)
duplicates_col2 = df['Col2'].duplicated(keep=False)

if duplicates_col1.any():
print("Warning: Duplicate found in column 1")
print(df[duplicates_col1]['Col1'].value_counts())

if duplicates_col2.any():
print("Warning: Duplicate found in column 2")
print(df[duplicates_col2]['Col2'].value_counts())


def get_mapfile_postfix(mapparam):
post = mapparam.replace(' ', '')
return post
Expand Down Expand Up @@ -146,6 +178,7 @@ def is_exist_input(samplepairlist):
else:
return True


def exec_churros(args):
samplelist = args.samplelist
samplepairlist = args.samplepairlist
Expand All @@ -165,6 +198,10 @@ def exec_churros(args):
samplelist = pathlib.Path(samplelist).resolve()
samplepairlist = pathlib.Path(samplepairlist).resolve()

# check samplelist
check_fastq_in_samplelist(samplelist)
check_duplicates(samplelist)

mapparam = args.mapparam
post = get_mapfile_postfix(mapparam)
gt = Ddir + '/genometable.txt'
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Dockerfiles/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tag=0.10.5
tag=0.10.6
docker build -f Dockerfile.$tag -t rnakato/churros:$tag . #--no-cache
#docker save -o churros-$tag.tar rnakato/churros:$tag
#singularity build -F churros.$tag.sif docker-archive://churros-$tag.tar
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sphinx_rtd_theme

0 comments on commit 66846e2

Please sign in to comment.