Skip to content

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
j-berg committed Feb 24, 2021
1 parent f1970fc commit 2c96e9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xpresspipe/Rmetagene.r
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,13 @@ run_list <- function (
file_name = vapply(strsplit(f, "[.]"), `[`, 1, FUN.VALUE=character(1))
output_file = paste(output_path, file_name, '.metaposit', sep='')
write.table(bam, file=output_file, sep='\t', col.names=NA)

print(paste('Metagene profile for', toString(f), 'written to', toString(output_file), sep=' '))
}
}

# MAIN
# Run files through coverage checker
print(paste('Rscript processing file list:', BAM_LIST, sep=' '))
run_list(BAM_PATH, BAM_LIST, OUTPUT_LOCATION)
print("Metagene BAM file processing complete.")
3 changes: 3 additions & 0 deletions xpresspipe/metagene.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def finish_metagene(

file, args_dict = args[0], args[1]

print('Reading in ' + str(args_dict['metagene']) + 'metrics/' + str(file).split('.')[0] + '.metaposit')

# Read in parsed bam
bam = pd.read_csv(
str(args_dict['metagene']) + 'metrics/' + str(file).split('.')[0] + '.metaposit',
Expand Down Expand Up @@ -130,6 +132,7 @@ def finish_metagene(
profile.to_csv(
str(args_dict['metagene']) + 'metrics/' + str(file).split('.')[0] + '_metrics.txt',
sep='\t')
print('Profile exported to ' + str(args_dict['metagene']) + 'metrics/' + str(file).split('.')[0] + '_metrics.txt')

# Clean up
bam = None
Expand Down

0 comments on commit 2c96e9d

Please sign in to comment.